I spent a lot of time on this task and spent many hours of research, but I still have no solution.
I get error 401
But if I add this to the end of the url :? jsonpcallback =?
I get this in the console: Uncaught SyntaxError: Unexpected token:
Can someone direct me to this, please, and tell me what I'm doing wrong. Thank you in advance!
Here is my code:
$.ajax({
type: "GET",
url: "XXX/jsonpcallback=?",
dataType: 'jsonp',
crossDomain:true,
success: function (data){
console.log(data);
},
error: function (err) {
console.log(err)
}
});
source
share