Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 731 Bytes

README.md

File metadata and controls

25 lines (17 loc) · 731 Bytes

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