I solved it with JSON.stringify(params) with the sending the request :
function loginClick(e)
{
var url = 'http://...';
var xhr = Ti.Network.createHTTPClient({
onload: function(e) {
// this function is called when data is returned from the server and available for use
// this.responseText holds the raw text return of the message (used for text/JSON)
// this.responseXML holds any returned XML (including SOAP)
// this.responseData holds any returned binary data
Ti.API.debug(this.responseText);
alert(xhr.responseText);
},
onerror: function(e) {
// this function is called when an error occurs, including a timeout
Ti.API.debug(e.error);
alert(this.status);
alert("error" + e.toString);
},
timeout:5000 /* in milliseconds */
});
xhr.autoEncodeUrl = false;
var params = {
'email': $.email.value,
'password' :$.password.value
};
xhr.open('POST', url);
xhr.setRequestHeader("Content-Type", "application/json; charset=utf-8");
xhr.send(JSON.stringify(params)); // request is actually sent with this statement
};