Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

doc: clarify http.request language #8990

Closed
wants to merge 1 commit into from
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
7 changes: 4 additions & 3 deletions doc/api/http.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,10 @@ automatically parsed with [url.parse()][].

Options:

- `host`: A domain name or IP address of the server to issue the request to.
Defaults to `'localhost'`.
- `hostname`: To support `url.parse()` `hostname` is preferred over `host`
- `host`: A domain name or IP address of the server to issue the request to,
optionally including a port number. Defaults to `'localhost'`.
- `hostname`: A domain name or IP address, may not include a port. Supports
`url.parse()` by preferring `hostname` over `host`
- `port`: Port of remote server. Defaults to 80.
- `localAddress`: Local interface to bind for network connections.
- `socketPath`: Unix Domain Socket (use one of host:port or socketPath)
Expand Down