promising-request

0.1.0 • Public • Published

NPM version Build Status Dependency Status

A promises-based wrapper for request

Install

$ npm install --save promising-request

Usage

Use everything as you normally would use if it were request but every HTTP method returns a promise.

var promisingRequest = require('promising-request');
 
var promisedLuke = promisingRequest.get('http://swapi.co/api/people/1');
 
promisedLuke.then(function(res) {
  //fiddle with response
}, function(err) {
  //or handle the errors
});

License

MIT © Fábio Oliveira

Package Sidebar

Install

npm i promising-request

Weekly Downloads

0

Version

0.1.0

License

MIT

Last publish

Collaborators

  • foliveira