prm-request
Slim promise wrapper for http.request
npm install --save prm-request
Examples
const prmRequest = ; let options = host: 'google.com'; let response = await ; //If you pass a callback as second argument it will be called with the created requestlet response = await ;
API
request(options, [requestCreated])
arguments
options: object, same as used for http.request
requestCreated: function, called after the request is created
returns
Promise