Thin request
Thin http(s) request promise wrapper.
Installation
$ npm i --save thin-request
Usage
GET
;
POST
;
PUT
;
DELETE
;
Options
This module takes care of these behind the scenes. You can easily override by defining the ones you want in the input options.
// parses the endpoint you provideconst url = ; const opts = hostname: urlhostname || paramshostname port: urlport || paramsport path: urlpath || paramspath protocol: urlprotocol || paramsprotocol json: false || paramsjson // Take a look at GET example. method: paramsmethod || 'GET' family: paramsfamily || null localAddress: paramslocalAddress || null auth: paramsauth || null agent: paramsagent || null createConnection: paramscreateConnection || null;
Tests
$ npm test
Contribution
Contributions are appreciated.
License
MIT-licensed. See LICENSE.