For the NodeJS https
library, what is the default timeout for the http.Agent
and http.Request
? I was checking the documentation for the agent and the documentation for the request. Every field has a default listed except for timeout. What is it? Is it infinite for both? Lastly, can I set the timeout in the Agent and not the request? I'm assuming you can set it in the agent so that it will apply to any request using the agent. Otherwise, you can set it on the request so only that request will have the specified timeout.
Asked
Active
Viewed 706 times
1

Spark323
- 1,525
- 2
- 16
- 27
-
Does this help? https://stackoverflow.com/questions/6214902/how-to-set-a-timeout-on-a-http-request-in-node – LearningEveryday Sep 28 '20 at 21:46
-
https://stackoverflow.com/questions/23874954/is-there-a-default-timeout-in-node-js-for-http-request – ulou Sep 28 '20 at 22:40
-
1@ulou Thanks, but that is the server timeout not the request timeout as far as I can tell – Spark323 Sep 29 '20 at 01:23