Sunday, 18 August 2013

generate automatic callback for jsonp file

generate automatic callback for jsonp file

i have a jsonp file
test.jsonp
I want it return below if I call it with test.jsonp?callback=a
a_callback{"x":"1"}
and return below if I call it with test.jsonp?callback=b
b_callback{"x":"1"}
in other words I like to warp my data automatically in a callback with
regards to my call and do not want to create separate file for each
callback as the data are same.

No comments:

Post a Comment