Skip to content

Commit 99973da

Browse files
authored
Updated to undici@2 (#101)
1 parent 066267e commit 99973da

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/request.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function buildRequest (opts) {
2222
const baseUrl = opts.base
2323
const http2Opts = getHttp2Opts(opts)
2424
const httpOpts = getHttpOpts(opts)
25+
const undiciOpts = opts.undici
2526
var http2Client
2627
var pool
2728
var agents
@@ -96,7 +97,8 @@ function buildRequest (opts) {
9697
path: opts.url.pathname + opts.qs,
9798
method: opts.method,
9899
headers: Object.assign({}, opts.headers),
99-
body: opts.body
100+
body: opts.body,
101+
requestTimeout: undiciOpts.requestTimeout
100102
}
101103

102104
// remove forbidden headers

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"pump": "^3.0.0",
5454
"semver": "^7.2.1",
5555
"tiny-lru": "^7.0.0",
56-
"undici": "^1.3.1"
56+
"undici": "^2.0.0"
5757
},
5858
"tsd": {
5959
"directory": "test"

0 commit comments

Comments
 (0)