How can I increase the headersTimeout with Node.js's fetch? #1989
-
I saw a PR that got merged recently into the latest 18.x release that supposedly increased the headers and body timeouts to 300s to match Chrome, however I'm still getting timed out in 30s. Is there a way to force the timeout to be whatever value I want? |
Beta Was this translation helpful? Give feedback.
Answered by
metcoder95
Jul 19, 2023
Replies: 1 comment 8 replies
-
What Node version are you using? |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sadly we cannot help you that much without a
Minimum Reproducible Example.
On a big overview, you cannot do that with fetch, as the
spec
does not support that configuration. One thing you can do, if wanting to usefetch
in Node, is to pass a custom dispatcher that has all the timeout settings configured already.e.g.
Reference - https://undici.nodejs.org/#/?id=undicifetchinput-init-promise