0
在Worklight中,我试图发送一个包含希腊字母参数的HTTP请求(通过HTTP适配器)。然而,应用的编码将希腊字母改为象形文字。有谁知道我可以如何让请求发送希腊字符?Worklight - 通过HTTP发送希腊字符
var request =
'<?xml version="1.0" encoding="UTF-8"?>'
+ '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" '
+ 'xmlns:test="">'
+ '<soapenv:Header/>'
+ '<soapenv:Body>'
+ '<test:getAnalysis>'
+ '<request>'
+ '<invoiceId>' + invoiceId + '</invoiceId>'
+ '</request>'
+ '</test:getAnalysis>'
+ '</soapenv:Body>'
+ '</soapenv:Envelope>';
var options = {
method : 'post',
returnedContentType : 'xml',
path : getPath(),
body: {
content: request.toString(),
contentType: 'text/xml; charset=utf-8',
},
};
return WL.Server.invokeHttp(options).Envelope.Body;
你使用什么编码?你怎么应用它? – Floris
你可以包含你的代码样本吗? –
我刚刚尝试使HTTP适配器将希腊数据发送到测试服务器,并且它工作正常。你也可以试试。发送带有名为'data'的参数的POST到这个URL:http://burnished-yeti-689.appspot.com/ –