I am trying to access an API from bar.com from my site foo.com. Bar.com does NOT allow CORS, and I don't know if they officially support JSONP.
Can I still access the API via JSONP (using jQuery) or does the site explicitly need to support it?
Note, this is my AJAX request:
$.ajax({ url: 'https://api.example.com', jsonp: 'callback', dataType: 'jsonp', data: { 'command' : 'abc', 'partnerName' : 'def', 'partnerPassword' : 'ghi', 'partnerUserID' : 'jkl', 'partnerUserSecret' : 'mnop' }, error: function (response) { console.log(response); return false; }, success: function (response) { console.log(response); return false; } }); }, From Chrome I get:
Uncaught SyntaxError: Unexpected token :