v1.3.7: agent passthru (also timeout, setHost, createConnection, family, host, localAddress)
This commit is contained in:
parent
4eaf68966c
commit
aec78877cf
10
index.js
10
index.js
|
@ -188,6 +188,16 @@ function setDefaults(defs) {
|
||||||
Object.keys(opts.uri).forEach(function (key) {
|
Object.keys(opts.uri).forEach(function (key) {
|
||||||
finalOpts[key] = opts.uri[key];
|
finalOpts[key] = opts.uri[key];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// A bug should be raised if request does it differently,
|
||||||
|
// but I think we're supposed to pass all acceptable options
|
||||||
|
// on to the raw http request
|
||||||
|
[ 'family', 'host', 'localAddress', 'agent', 'createConnection'
|
||||||
|
, 'timeout', 'setHost'
|
||||||
|
].forEach(function (key) {
|
||||||
|
finalOpts[key] = opts.uri[key];
|
||||||
|
});
|
||||||
|
|
||||||
finalOpts.method = opts.method;
|
finalOpts.method = opts.method;
|
||||||
finalOpts.headers = JSON.parse(JSON.stringify(opts.headers));
|
finalOpts.headers = JSON.parse(JSON.stringify(opts.headers));
|
||||||
if (_body) {
|
if (_body) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@coolaj86/urequest",
|
"name": "@coolaj86/urequest",
|
||||||
"version": "1.3.6",
|
"version": "1.3.7",
|
||||||
"description": "A lightweight drop-in replacement for request",
|
"description": "A lightweight drop-in replacement for request",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"files": [
|
"files": [
|
||||||
|
|
Loading…
Reference in New Issue