corie-request
v1.0.8
Published
A custom request
Downloads
8
Maintainers
Readme
corie-request
Note: A promisify request
Configuration
- request options
- extra options
- host - Array or String. sets the host portion of the URL.
- interval - The time interval of retrying
- logger - default: corie-logger. logger instance
- logLevel - default:
ERROR
. apply tocorie-logger
- retries - default:
3
times. times of retrying - balance - default:
roundrobin
. ways of balance - protocol - default:
http:
. network protocol - validateBody - function. return
true
ornew Error()
- abortion -
new Abortion()
Usage
const request = require('corie-request');
const { Abortion } = request;
const abortion = new Abortion();
request({
abortion,
...options
});
abortion.abort();