I am using following ajax to receive data from server.
$.get("http://***/umbraco/Api/SomeApi/SignIn",{apiVersion : 1,email:"name@gmail.com", password:"mypassword" },function(data) {
alert('in');
alert(data);
}, "jsonp");
I could see 200 Ok in inspect element. And i could also see the response text. But i couldn't get data in alert. Both above alerts aren't working.
EDIT
I tried the following ajax:
jQuery.ajax({
type: "GET",
url: 'http://***/umbraco/Api/SomeApi/SignIn?apiVersion=1&email=name@gmail.com&password=mypassword&callback=?',
dataType: "json",
success: function (results) {
alert("Success!");
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("error");
alert('XMLHttpRequest '+ XMLHttpRequest);
alert('textStatus '+ textStatus);
alert('errorThrown '+ errorThrown);
}
});
Results in:
Status Code: 200 Ok
But,
Parse Error is throwing. How can i fix this?
Please Help.