rzero

Simple http request helper

npm install rzero
8 downloads in the last week
17 downloads in the last month

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;
  });
npm loves you