Below is my specifications I am running:
Operating System Name = Mac OS X Version
= 10.9.5 Architecture = 64bit
Titanium CLI CLI Version = 3.4.1 Titanium SDK SDK Version = 3.5.0.GA Target Platform = androidEx:-> Node.js Node.js Version = 0.10.24 npm Version= 1.3.21
Here is my code:
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" : "[email protected]",
"password" : "secure"
}
};
xhr.send(JSON.stringify(param));