Skip to content
Permalink
Browse files

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>
  • Loading branch information
lpinca authored and MylesBorins committed Nov 10, 2019
1 parent 17963bb commit d2c85f32c65ce061850ddf8c80a98a7b6ff43246
Showing with 2 additions and 0 deletions.
  1. +2 −0 doc/api/http.md
@@ -2065,6 +2065,7 @@ changes:
* `hostname` {string} Alias for `host`. To support [`url.parse()`][],
`hostname` will be used if both `host` and `hostname` are specified.
* `localAddress` {string} Local interface to bind for network connections.
* `lookup` {Function} Custom lookup function. **Default:** [`dns.lookup()`][].
* `method` {string} A string specifying the HTTP request method. **Default:**
`'GET'`.
* `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.
[`agent.createConnection()`]: #http_agent_createconnection_options_callback
[`agent.getName()`]: #http_agent_getname_options
[`destroy()`]: #http_agent_destroy
[`dns.lookup()`]: dns.html#dns_dns_lookup_hostname_options_callback
[`'finish'`]: #http_event_finish
[`getHeader(name)`]: #http_request_getheader_name
[`http.Agent`]: #http_class_http_agent

0 comments on commit d2c85f3

Please sign in to comment.
You can’t perform that action at this time.