-
Notifications
You must be signed in to change notification settings - Fork 0
Cookbook: jsonp
Eugene Lazutkin edited this page Nov 26, 2019
·
3 revisions
Just including io.jsonp
activates it. See How to include for more details. See jsonp for the full documentation.
io.jsonp('/url').then(function (value) {
console.log('Got:', value);
});
io.jsonp('/url', {q: 1}).then(function (value) {
console.log('Got:', value);
});
io.jsonp({
url: '/url',
callback: 'cb' // new callback name
}).then(function (value) {
console.log('Got:', value);
});