superagent-future

0.1.2 • Public • Published

superagent-future

Fantasy Land Future extension of superagent.

installation

npm i -S superagent-future

usage

Simply require the module require('superagent-future'). This extends the prototype of superagents Request class with a method called createFuture.

require('superagent-future');
var request = require('superagent');

var future = request.post(someURL)
  .set('SomeHeader', 'someValue')
  .send(someData)
  .createFuture();

future.fork(errFn, successFn);

underlying future implementation

superagent-future currently uses the future class from ramda-fantasy

Package Sidebar

Install

npm i superagent-future

Weekly Downloads

848

Version

0.1.2

License

ISC

Last publish

Collaborators

  • theludd