Nebulous Program Mechanic
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    superagent-jsonpxpublic

    superagent-jsonpx

    npm version Coverage Status

    Installation

    Install for node.js or browserify using npm:

    $ npm install --save-dev superagent-jsonpx
    

    Example

    var request = require('superagent');
    var jsonp = require('superagent-jsonpx');
     
    var options = { timeout: 3000, callbackKey: 'cb' };
     
    request.get(uri)
      .use(jsonp(options))
      .end(function (err, res) {
        if (!err && res.body) {
          // request success
          console.log(res.body);
        } else {
          // request timeout (or error)
        }
      });

    Options

    timeout

    If there is no response after a timeout, it will determine that an error has occurred.

    • default: 1000ms

    callbackKey

    This will change the default query string callback parameter.

    • default: callback

    install

    npm i superagent-jsonpx

    Downloadsweekly downloads

    7

    version

    0.1.0

    license

    MIT

    repository

    githubgithub

    last publish

    collaborators

    • avatar