I´m making a simple GET request in titanium and it seems to be that in versions of android 5.0 and up doesn´t work correctly. Here is the response of the console that im receiving.
< ANDROID 5.0
[INFO] : Status: 200, connectionType: GET
=> ANDROID 5.0
{"source":{"password":null,"status":0,"username":null,"autoRedirect":true,"bubbleParent":true,"allResponseHeaders":"","location":"","autoEncodeUrl":true,"apiName":"Ti.Network.HTTPClient","responseXML":null,"validatesSecureCertificate":false,"readyState":1,"domain":null,"responseText":"","responseData":null,"connectionType":"GET","statusText":null,"connected":false,"_events":{"disposehandle":{}}},"error":"Handshake failed","code":-1,"success":false}
ERROR: "Handshake failed"
Here is the code that im using.
var url = "MY URL";
var loader = Titanium.Network.createHTTPClient();
loader.onload = function()
{
Titanium.API.info('Status: ' + this.status);
Titanium.API.info('ResponseText: ' + this.responseText);
Titanium.API.info('connectionType: ' + this.connectionType);
Titanium.API.info('location: ' + this.location);
};
loader.onerror = function (e) {
console.log(JSON.stringify(e));
console.log("ERROR: " + JSON.stringify(e.error));
};
loader.open("GET",url);
loader.send();
Hope you can help me with this.
