superagent-jsonp-cacheable

0.0.9 • Public • Published

superagent-jsonp-cacheable

Adds cacheable jsonp behaviour to superagent. Basically a copy of superagent-jsonp package with a line change to allow caching. Thanks to @lamp.

To use with browserify

First install with npm

npm i superagent-jsonp-cacheable --save

Then use like so;

var superagent = require('superagent');
 
let jsonp = require('superagent-jsonp-cacheable');
 
superagent.get('http://example.com/foo.json').use(jsonp).end(function(err, res){
  // everything is as normal
});
 

To use with bower

First install:

bower i superagent-jsonp-cacheable --save

Include it from your bower components in the usual way

Then use pretty much as you do above

superagent.get('http://example.com/foo.json').use(superagentJSONP).end(function(err, res){
  // everything is as normal
});

Readme

Keywords

Package Sidebar

Install

npm i superagent-jsonp-cacheable

Weekly Downloads

2

Version

0.0.9

License

MIT

Last publish

Collaborators

  • kdavh