mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: call out http(s).globalAgent default
Despite the `http.Agent` stating:
> The default `http.globalAgent` that is used by `http.request()` has
> all of these values set to their respective defaults.
this isn't true anymore since node.js 19. Both, the http as well as the
https `globalAgent` now set `{ keepAlive: true, scheduling: 'lifo',
timeout: 5000 }` as options. `'lifo'` is the default anyway, but
`keepAlive` is turned off and no `timeout` is set on `new Agent()`.
Document the diverging behaviour in the `globalAgent` sections, remove
the false statement from `http.Agent` section, and extend the changelog
to call out the timeout change as well.
PR-URL: https://github.com/nodejs/node/pull/52392
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
This commit is contained in:
@@ -327,10 +327,13 @@ changes:
|
||||
- version:
|
||||
- v19.0.0
|
||||
pr-url: https://github.com/nodejs/node/pull/43522
|
||||
description: The agent now uses HTTP Keep-Alive by default.
|
||||
description: The agent now uses HTTP Keep-Alive and a 5 second timeout by
|
||||
default.
|
||||
-->
|
||||
|
||||
Global instance of [`https.Agent`][] for all HTTPS client requests.
|
||||
Global instance of [`https.Agent`][] for all HTTPS client requests. Diverges
|
||||
from a default [`https.Agent`][] configuration by having `keepAlive` enabled and
|
||||
a `timeout` of 5 seconds.
|
||||
|
||||
## `https.request(options[, callback])`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user