i m using the same code and not able to send restful request in phonegap getting error Access-control-allow-origin is null.
`//JSON OBJECT
var obj = {
"userId": UserId,
"userName1": UserName1,
"userName2": UserName2,
"recipientType":RecipientType,
"RecipientValue":RecipientValue,
}
var jsonString = JSON.stringify(obj);
alert(jsonString);
//THIS IS HOW I SEND JSON OBJECT
var url = "http://someurl";
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "post", url, false );
xmlHttp.setRequestHeader("Content-Type","application/json");
xmlHttp.send(jsonString);
alert(xmlHttp.responseText);
`