0.2.0 • Published 10 years ago

qreq v0.2.0

Weekly downloads
1
License
ISC
Repository
github
Last release
10 years ago

qreq

Build Status

A q-style promise wrapper for HTTP requests

Installation:

To install, go to your console/terminal and run:

npm install qreq

Usage:

In your project, require the package:

var qreq = require("qreq");

To make a GET request, using the promise syntax:

qreq
  .get("http://google.com")
  .then(function(res){
    console.log(res.body);
    //...
  })
  .fail(function(err){
    console.log(err);
    //...
  });

To make a GET request, using the callback syntax:

qreq.get("http://google.com", function(err, res){
  if(err){
    console.log(err);
    //...
  } else {
    conslole.log(res.body);
    //...
  }
});

Change log:

0.2.0 - Adds callback functionality

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago