Skip to content

letsxo/request-bird

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Promisified request

This packages is a wrapper around the request library. We are using bluebird for promisification.

Installation

npm install request bluebird request-bird

Usage

GET

If you just want a GET request you can do that in the following way:

var request = require('request-bird');

request('http://test.com')
  .then(function(response) {
    
  })
  .catch(function(err) {

  });

Or you can use the get function:

var request = require('request-bird');

request
  .get('http://test.com')
  .then(function(response) {
    
  })
  .catch(function(err) {

  });

POST

You can send data easier with this package because we added a parameter for that to the post, put, patch functions.

var request = require('request-bird');

request
  .post('http://test.com', {
    foo: 'bar'
  })
  .then(function(response) {
    
  })
  .catch(function(err) {

  });

About

Promisified request library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published