GT2/GT2-iOS/node_modules/jsonp
Ren Ren Juan 30eef7d036 correct tree err 2018-02-12 17:26:06 +00:00
..
.npmignore correct tree err 2018-02-12 17:26:06 +00:00
History.md correct tree err 2018-02-12 17:26:06 +00:00
Readme.md correct tree err 2018-02-12 17:26:06 +00:00
component.json correct tree err 2018-02-12 17:26:06 +00:00
index.js correct tree err 2018-02-12 17:26:06 +00:00
package.json correct tree err 2018-02-12 17:26:06 +00:00

Readme.md

jsonp

A simple JSONP implementation.

Installation

Install for node.js or browserify using npm:

$ npm install jsonp

Install for component(1) using component:

$ component install LearnBoost/jsonp

API

jsonp(url, opts, fn)

  • url (String) url to fetch
  • opts (Object), optional
    • param (String) name of the query string parameter to specify the callback (defaults to callback)
    • timeout (Number) how long after a timeout error is emitted. 0 to disable (defaults to 60000)
  • fn callback

The callback is called with err, data parameters.

If it times out, the err will be an Error object whose message is Timeout.

License

MIT