Social Reiot

Social Game Developer wandering in strange dungeon.

How to Handle Jsonp?

Javascript:

callback=? will be transformed automatically like jsonp12345

$.getJSON(http://somewhere.com/view/?callback=?&arg1=xxx&arg2=yyy)

Server:

server will get URL like this.

GET /view?callback=jsonp123545&arg1=xxx&arg2=yyy

should respond as normal html. (not application/json mime type)

jsonp12345({json result})

Comments