0.2.0-d • Published 9 years ago

cc-superagent-promise v0.2.0-d

Weekly downloads
6
License
MIT
Repository
github
Last release
9 years ago

superagent-promise

Simple/dumb promise wrapper for superagent. Both superagent and promise are peerDependencies.

Usage

var agent = require('superagent-promise');

// method, url form
agent('GET', 'http://google.com').
  end().
  then(function onResult(res) {
  });

// helper functions: get, head, patch, post, put, del
agent().
  put('http://myxfoo', 'data').
  end().
  then(function(res) {
  });