Json Tools

फ़्री
द्वारा thefosk | अपडेट किया गया il y a 2 mois | Other
Health Check

N/A

सभी चर्चाओं पर वापस जाएं

Would be cool to have a jsonp wrap endpoint.

Rapid account: Montanaflynn
montanaflynn
il y a 10 ans

Like this: http://jsonpwrapper.com/, I think it fits in with Json Tools better than making a complete API just for this.

Rapid account: Montanaflynn
montanaflynn Commented il y a 10 ans

While it’s great Mashape allows cross domain request (and why isn’t this documented better?), I was just thinking about adding a simple endpoint to this API that would wrap the json into a jsonp with the provided callback function name.

Parameters:
json: {“some” : “thing”}
callback: “do”

Result:
do({“some”:“thing”})

Rapid account: Thefosk
thefosk Commented il y a 10 ans

If you want to consume the API via Javascript, the Mashape proxy supports CORS. So you can actually consume it by making a regular CORS request. For example jQuery already handles the CORS headers automatically, thus you can consume the API with the following script: https://gist.github.com/thefosk/5024297

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें