From 5b539deb7b18f6cab53e32c2e9de865ef4961375 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Tue, 14 Jun 2022 01:24:50 -0600 Subject: [PATCH] fix: copy http options from opts (not opts.uri) --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 40284b0..ab1643e 100644 --- a/index.js +++ b/index.js @@ -324,7 +324,9 @@ function setDefaults(defs) { 'timeout', 'setHost' ].forEach(function (key) { - finalOpts[key] = opts.uri[key]; + if (key in opts) { + finalOpts[key] = opts[key]; + } }); finalOpts.method = opts.method;