Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: call out http(s).globalAgent defaults #52392

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,6 @@ changes:

`options` in [`socket.connect()`][] are also supported.

The default [`http.globalAgent`][] that is used by [`http.request()`][] has all
of these values set to their respective defaults.

To configure any of them, a custom [`http.Agent`][] instance must be created.

```mjs
Expand Down Expand Up @@ -3654,13 +3651,15 @@ 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.
-->

* {http.Agent}

Global instance of `Agent` which is used as the default for all HTTP client
requests.
requests. Diverges from a default `Agent` configuration by having `keepAlive`
enabled and a `timeout` of 5 seconds.

## `http.maxHeaderSize`

Expand Down
7 changes: 5 additions & 2 deletions doc/api/https.md
Original file line number Diff line number Diff line change
Expand Up @@ -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])`

Expand Down