Jsonp


#1

Would it be possible to add JSONP functionality to the API? I was trying to make a page with some user statistics in HTML5, but the cross-site request restrictions prevent a regular call to the API, something JSONP can “circumvent”.


#2

Hmm reading up on it, it looks like all I need to do on my end is add a call back parameter to the URL call?


#3

Yeah I’ll add the parameter and you add the function call :slight_smile:

So if I call http://www.wanikani.com/api/user/totallysecretapikey/user-information?callback=somestring

The server replies with

somestring({“user_information”:{“username”:“piderman” etc etc });



#4

Got it… Will update to version 1.1 in the next hour here.


#5

Excellent, thank you :slight_smile:


#6

I totally was not impatient. It’s working perfectly, thanks :smiley:


#7

piderman said…
Which parameter triggers the JSONP?  ?callback= doesn’t seem to work.

Callback should work…

EDIT: Saw your edited msg. Removed my link. Glad its working for you now.