Fantasy Land Future extension of superagent.
npm i -S superagent-future
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);
superagent-future currently uses the future class from ramda-fantasy