Feature Request
The purpose of this feature request is to support Synchronous HTTP Calls on android as currently is in iOS.
HTTPClient method
http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.Network.HTTPClient.open-method.html
Repro sequence to test
Pass a third argument (true/false) to open()
var bool, xhr;
xhr = Titanium.Network.createHTTPClient();
bool = false;
xhr.open("GET", "http://api.twitter.com/1/help/test.json", false);
xhr.onreadystatechange = function() {
Ti.API.debug("Ready State change to " + xhr.status);
if (xhr.status === 200) {
Ti.API.debug("Setting bool to true");
bool = true;
}
};
xhr.send();
Ti.API.debug("Bool is: " + bool);
Output
D/TiAPI ( 304): Bool is: false
No comments