0.4.0 • Published 7 years ago
superagent-rx v0.4.0
superagent-rx
A plugin for superagent that allows getting results as Rx.Observable.
Installation
Install with npm:
$ npm install superagent-rx
Usage
var superagent = require('superagent');
// load and apply plugin
var superagentRx = require('superagent-rx');
superagentRx(superagent);
superagent
.get(requestUrl)
.observe() // this returns Rx.Observable
.subscribe(function(res) {
should(res.body.test).equal('OK');
done();
});