fix: copy http options from opts (not opts.uri)

This commit is contained in:
AJ ONeal 2022-06-14 01:24:50 -06:00 committed by GitHub
parent 0a2e7afa76
commit 5b539deb7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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;