I am making a simple HTTP request and cannot get a response inside my app. (I can navigate to this page in Safari) I am using an iPhone 6 on iOS 8.3 and Titanium SDK 3.5.0. I have also loaded this same code onto a physical iPhone and it works fine. Does anyone know what the problem is with the simulator? Thanks!
~~~var url = "https://www.appcelerator.com";
var xhr = Ti.Network.createHTTPClient({
onload: function(e) {
Ti.API.debug(this.responseText);
alert(this.responseText);
},
onerror: function(e) {
console.log(e.error);
alert('error');
},
timeout:5000
});
xhr.open("GET", url);
xhr.send();~~~
↧