After migrating my app from Parse.com to back4app platform, we started facing issues with cloud code functions.
I have a cloud code function which is calling the following url: http://www.pro.co.il/homeler/test.asp?c=6&a=51
And the error is: { [Error: Parse Error] bytesParsed: 373, code: 'HPE_UNEXPECTED_CONTENT_LENGTH' }
The cloud code function:
Parse.Cloud.define("getFromPro", function (request, response) {
return Parse.Cloud.httpRequest({
url: 'http://www.pro.co.il/homeler/test.asp?c=' + request.params.classification + '&a=' + request.params.area,
method: 'GET',
headers: {
'Content-Type': 'application/json;charset=utf-8'
}
}).then(function (httpResponse) {
response.success(httpResponse);
}, function (httpResponse) {
response.error("not ok");
});
});
Any idea if the issue is at back4app server, or I can fix it in my cloud code function?