Node.js HTTP client
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test returns params link May 19, 2013
.gitignore
.travis.yml
README.md
package.json

README.md

build status

rzero

Simple node request client.

API

rzero( handler.url )
  .head( 'Content-Type', 'application/json' )
  .head( {'X-Api-Version': '2.1.0', 'X-Req-Id': 'asd'} )
  .prms( 'login', 'artjock' )
  .prms( {name: 'Artur', gender: 'male'} )
  .body( body )
  .type( 'response type', 'request type' )
  .bind( 'text', function(text) { return text.replace(/'/g, '"'); } )
  .bind( 'json', function(json) { return json.users[0].name; } )
  .time( 100 )
  .done(function(err, result) {
    err;
    result.req;
    result.res;
    result.text;
    result.data;
    result.params;
    result.status;
  });