httpclient settimeout and onerror don't work in android?
I'm using Android and cannot get either settimeout or onerror to work with the httpclient object. Here is the code:
function ajaxCall(method, callbackFunction) {
var loader = Ti.Network.createHTTPClient();
loader.setTimeout(30000);
loader.onload = callbackFunction;
loader.onerror = ajaxError;
loader.open("GET", url + method);
loader.send();
}
I've tried setTimeout with and without the braces and it does nothing either way, it never triggers the onerror function, even if I disconnect my internet. What am I missing? Is this one more Android bug to add to the list of a hundred I've already found in my first week of Appcelerator development?
1 Answer
-
I saw this on an old posting
loader.setTimeout([30000]);