0.0.2-tm3 • Published 9 years ago

@ticketmaster/superagent-jsonp v0.0.2-tm3

Weekly downloads
-
License
WTFPL
Repository
github
Last release
9 years ago

superagent-jsonp

Adds jsonp behaviour to superagent.

To use with browserify

First install with npm

npm i superagent-jsonp --save

Then use like so;

var superagent = require('superagent');

require('superagent-jsonp')(superagent);

superagent.get('http://example.com/foo.json').jsonp().end(function(){
  // everything is as normal
});

To use with bower

First install:

bower i superagent-jsonp --save

Include it from your bower components in the usual way

Then use pretty much as you do above

superagentJSONP(superagent);

superagent.get('http://example.com/foo.json').jsonp().end(function(){
  // everything is as normal
});

Changes from upstream

Forked from: https://github.com/lamp/superagent-jsonp