Skip to content
Closed
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
16 changes: 16 additions & 0 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,21 @@ options.agent = keepAliveAgent;
http.request(options, onResponseCallback);
```

### `agent.options`

<!-- YAML
added: v0.3.4
-->

* {Object}

The options used by the agent when creating new connections. This is a shallow
copy of the `options` argument passed to the [`Agent`][] constructor, with
agent defaults and normalizations applied.

For example, [`http.globalAgent.options`][] can be used as the base options
when creating another [`Agent`][] instance with additional custom settings.

### `agent.createConnection(options[, callback])`

<!-- YAML
Expand Down Expand Up @@ -4701,6 +4716,7 @@ const agent2 = new http.Agent({ proxyEnv: process.env });
[`http.Server`]: #class-httpserver
[`http.createServer()`]: #httpcreateserveroptions-requestlistener
[`http.get()`]: #httpgetoptions-callback
[`http.globalAgent.options`]: #agentoptions
[`http.globalAgent`]: #httpglobalagent
[`http.request()`]: #httprequestoptions-callback
[`http.setGlobalProxyFromEnv()`]: #httpsetglobalproxyfromenvproxyenv
Expand Down
Loading