JSONP: Examples
JSONP provides a JSONPRequest object for reusable cross-domain requests to web services that support JSONP output and a Y.jsonp(..) method to instantiate and send a JSONPRequest.
- Getting cross domain JSON data using Y.jsonp(): Get basic GitHub user info using a
Y.jsonp(url, callback)
. - Reusing a JSONPRequest instance to poll a remote server: Create a reusable JSONPRequest object to poll the YUILibrary.com Gallery web service, fetching info on a random Gallery module.