529 B
529 B
jsonp
A simple JSONP implementation.
API
jsonp(url, opts, fn)
url
(String
) url to fetchopts
(Object
), optionalparam
(String
) name of the query string component to specify the callback (defaults tocallback
)timeout
(Number
) how long after a timeout error is emitted.0
to disable (defaults to60000
)
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