JSONP request returning error: “Uncaught SyntaxError: Unexpected token :”
问题 So I'm trying to make a request to the Stack Exchange API with the following jQuery code: $.ajax({ type: 'POST', url: 'http://api.stackoverflow.com/1.1/stats', dataType: 'jsonp', success: function() { console.log('Success!'); }, error: function() { console.log('Uh Oh!'); } }); But when I open the file on my machine, in either FireFox or Chrome, and make the request, I get this error: Resource interpreted as Script but transferred with MIME type application/json. Uncaught SyntaxError: