You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For more info about [https-proxy-agent](https://www.npmjs.com/package/https-proxy-agent), check [its repo](https://github.com/TooTallNate/proxy-agents).
236
241
242
+
By default, there is no request timeout. You can use the option `signal` to cancel request at the right time.
243
+
244
+
The common way is to use AbortControler:
245
+
246
+
```js
247
+
constcontroller=newAbortController()
248
+
249
+
// stop after 5 seconds
250
+
setTimeout(() => {
251
+
controller.abort()
252
+
}, 5000)
253
+
254
+
constdata=awaitextract(url, null, {
255
+
signal:controller.signal,
256
+
})
257
+
```
258
+
259
+
A newer solution is AbortSignal's `timeout()` static method:
0 commit comments