Unexpected token from webservice
- by Kenneth B
I got this little snippet where I call a Battlefield 3 stat server. If you visit this URL, which I'm calling, we'll be getting no errors:
http://api.bf3stats.com/pc/server/?output=json&id=534f7035-cef8-48aa-b233-8d44a0956e68
But when I try to get the stats via Ajax call, I get:
Uncaught SyntaxError: Unexpected token :
... In my console I can see that the response is coming in, as when I visit the url, but I can't get the data with the ajax call... Is there something wrong with my code???
$.ajax({
type: "GET",
url: "http://api.bf3stats.com/pc/server/?output=json&id=534f7035-cef8-48aa-b233-8d44a0956e68",
dataType: "jsonp",
success: function(response) {
console.log(response);
}
});
Thank you in advance...