4 ms·
You should probably include the ?callback= functionality anyway. A great deal of libraries assume it will be a get variable, and cater for it specially i.e. jQ
by qixxiq 16y ago
You should probably include the ?callback= functionality anyway. A great deal of libraries assume it will be a get variable, and cater for it specially
i.e. jQuery with http://jsonip.com/?callback= http://jsonip.com/?callback=?
- NovaDesu 16y agoI actually made something like this a while ago. http://demontunes.com/api/?g=ip http://demontunes.com/api/?g=ip // plain ip http://demontunes.com/api/?g=ip&format=json http://demontunes.com/api/?g=ip&format=json // in json http://demontunes.com/api/?g=ip&format=json&callback=hello http://demontunes.com/api/?g=ip&format=json&callback... // with a callback
- rburgt 16y agoyour absolutely right, but I did not make jsonip.com If you are using a framework for this, most of the time you are able to override callback function name, i.e. jQuery uses jsonpCallback : http://api.jquery.com/jQuery.ajax/ http://api.jquery.com/jQuery.ajax/ If not, load it manually as a script and generate a function for the callback.