Skip to content

Commit 671e028

Browse files
lpincatargos
authored andcommitted
doc: add lookup to http.request() options
Add documentation for the `lookup` option. PR-URL: #30353 Fixes: #30171 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 77abcad commit 671e028

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

doc/api/http.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,6 +2065,7 @@ changes:
20652065
* `hostname` {string} Alias for `host`. To support [`url.parse()`][],
20662066
`hostname` will be used if both `host` and `hostname` are specified.
20672067
* `localAddress` {string} Local interface to bind for network connections.
2068+
* `lookup` {Function} Custom lookup function. **Default:** [`dns.lookup()`][].
20682069
* `method` {string} A string specifying the HTTP request method. **Default:**
20692070
`'GET'`.
20702071
* `path` {string} Request path. Should include query string if any.
@@ -2227,6 +2228,7 @@ not abort the request or do anything besides add a `'timeout'` event.
22272228
[`agent.createConnection()`]: #http_agent_createconnection_options_callback
22282229
[`agent.getName()`]: #http_agent_getname_options
22292230
[`destroy()`]: #http_agent_destroy
2231+
[`dns.lookup()`]: dns.html#dns_dns_lookup_hostname_options_callback
22302232
[`'finish'`]: #http_event_finish
22312233
[`getHeader(name)`]: #http_request_getheader_name
22322234
[`http.Agent`]: #http_class_http_agent

0 commit comments

Comments
 (0)