Error Status 0. Message [object object
I am trying to post credentials to access an API and send sms from my app using HTML5. But i get error status 0 Message object object. i also have cross domain : true, what is the issue please help. Thanks.$(document).ready(function () {
$.ajax({
url: "http://api/SendSMS",
type: "POST",
crossDomain: true,
data: JSON.stringify({ 'Username': 'xxx',
'Password': 'xxx',
'Tagname': 'xxx',
'RecepientNumber': 'xxx',
'VariableList': '',
'ReplacementList': '',
'Message': 'test'
}),
contentType: "application/json; charset=utf-8",
dataType: "json",
//data: send,
error: function (xhr, error) {
alert('Error! Status = ' + xhr.status + ' Message = ' + xhr);
},
success: function (data) {
alert('msg');
}
});
return false;
});