very-tiny-http-client

1.0.5 • Public • Published

very-tiny-http-client

Merely a wrapper around NodeJS's native http and https packages.

npm install --save very-tiny-http-client

Examples

var httpclient = require('very-tiny-http-client');
 
httpclient.post({
        url: 'http://example.server:3000/resources',
        data: {
            arbirtrary: "JSON Payload"
        }
    }, function (err, res) {
        if (err) {
            throw err;
        }
        console.log(res);
    });

will result in something like:

{ headers: 
   { 'x-powered-by': 'Express',
     etag: 'W/"a-b541a50d"',
     date: 'Sun, 29 Mar 2015 18:41:49 GMT',
     connection: 'close' },
  statusCode: 204,
  statusMessage: undefined,
  body: '' }

Package Sidebar

Install

npm i very-tiny-http-client

Weekly Downloads

0

Version

1.0.5

License

MIT

Last publish

Collaborators

  • scravy