Gibt es etwas anders in, wie Parse.Cloud.httpRequest Kompression behandelt?Parse.Cloud.httpRequest Antwort gzip Inflation/Dekomprimierung
Auf parse.com, ich habe nie eine XML-Datei mit dem Empfang, ein Problem hatte, aber unter Verwendung von Parse-Server auf einem anderen Host (back4app), meine httpResponse.text ist eine Last von:
�E��ڇ�*q�������y���v^�����
Parse.Cloud.job("fetchData", function(request, status) {
Parse.Cloud.httpRequest({
method: 'GET',
url: 'http://example.com/test.xml',
headers: {
'Accept': 'application/xml',
'Accept-Encoding': 'gzip, deflate'
},
success: function (httpResponse) {
console.log("SUCCESS RECD FILE: " + httpResponse.text);
},
error: function (httpResponse) {
console.log('An error has occured with the http request.: ' + httpResponse);
}
});
}
Parse ist kein Webserver, ich glaube, Sie es in Ihrem nginx oder Apache konfigurieren sollte ... –
versuchen eine zip'd Antwort Handhabung .... http://stackoverflow.com/questions/12148948/ how-do-i-ungzip-dekomprimieren-a-nodejs-requests-modul-gzip-response-body –