#1 Posted by SithToast (176 posts) -

Hey guys, I was just wondering if the API was CORS friendly. I'm having a bit of trouble bringing in a JSON call with some javascript I'm working with and someone on another forum recommended that I ask about this!

Thanks!

#2 Edited by Chaser324 (7007 posts) -
Moderator
#3 Posted by Gzeno (2 posts) -

Hi, sorry to hijack this thread but I didn't want to make another one with a similar problem. I too am having issues getting JSON data with ajax.

I copied Chaser's code and linked it to a button but when I press the button, I only get "[object Object]" and then "done" rather than the actual JSON data.

When I try to run my own code, I either get 0kb back from the server with a blank error, or I get an error saying that the JSON has a syntax error and cannot be parsed. Both are 200 OK requests. The URL I gave to it is definitely works because I can access the data from my browser, just not my javascript program.

Any help would be appreciated, thanks.

#4 Posted by Mikeware (4 posts) -

Check out YOU_DIED pastebin comment in this thread: http://www.giantbomb.com/forums/api-developers-3017/giant-bomb-jquery-plugin-1445902/?messageId=6779873#js-message-3

It worked like a charm for me. After fighting with it for hours... :(