Ex:-
var url = "http://192.168.1.100/test.php"; var xhr = Titanium.Network.createHTTPClient(); xhr.onerror = function(e) { swim.lib.err('' + e.error); alert('HTTP ERR...'); }; xhr.onload = function(e) { Ti.API.info(this.responseText); alert('success'); }; xhr.open("POST", url); //post/get and your URL xhr.setRequestHeader("content-type", "application/json"); var param = { "user" : { "email" : "someone@email.com", "password" : "secure" } }; xhr.send(JSON.stringify(param));always give null !!
sdk: 3.5.1 genemotion emulator