superagent-promise
Simple/dumb promise wrapper for superagent. You must depend on superagent
and your favorite Promise library directly.
Usage
var Promise = this.Promise || require('promise');
var agent = require('superagent-promise')(require('superagent'), Promise);
agent('GET', 'http://google.com')
.end()
.then(function onResult(res) {
}, function onError(err) {
});
agent('GET', 'http://google.com')
.then(function onResult(res) {
});
agent.put('http://myxfoo', 'data')
.end()
.then(function(res) {
});
agent.put('http://myxfoo', 'data').
.then(function(res) {
});