lcm-requester - is a wrapper on request module with validation on top of format and rules used
Installation
Using npm:
$ npm install --save lcm-requester
Using yarn:
$ yarn add lcm-requester
Configuration
All available transports and configuration options listed below: Parameter "agentOptions" support the same options like HTTP Agent or HTTPS Agent
Example:
Super simple to use
const Requester = ;
// Use default configurationconst requester = ;
// Use custom timeout on request with timing infoconst requester = timeoutMsecs: 2000 timing: true;
// Use custom HTTP Agent for requestsconst requester = timeoutMsecs: 2000 agentOptions: keepAlive: true ;
const response responseBody = await requester;const response responseBody = await requester;const response responseBody = await requester;const response responseBody = await requester;