Skip to content

Dvbnhbq/jrequest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##Usage

Please refer to npm request for the full information about all the options.

request = require('jrequest');

request('http://google.com', function(err, response, body) {
	// Refer to 'request' package for help
})

// This is only called when 200 HTTP code is received
.done(function(data) {
  return console.log(data);
})

// Overwise
.fail(function(err, response, data) {
  return console.log("Error", response.statusCode || response);
})

.always(function(body, err, response) {
  return console.log("Error", err.statusCode || err);
});

// POST 
request.post('http://google.com')

// GET
request.get({
  url: 'http://google.com'
})
.done(function(data) {
  return console.log(data);
});

About

jQuery-similar style requests for NodeJS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published