I make a JSONP request to server, from which I get application/json response.
My function:
function testJSONP(url) {
$.ajax({
url: url,
jsonp: "callback",
contentType: 'application/json',
dataType: "jsonp",
success: function (response) {
console.log(response);
}
});
}
In Chrome console I get the following error message, and there's no output in console:
Uncaught SyntaxError: Unexpected token :
I have validated my json response manually, and it's ok.
What could be the problem then?