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: fix some inconsistent use of hostname #24199

Closed
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
2 changes: 1 addition & 1 deletion doc/api/async_hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ of propagating what resource is responsible for the new resource's existence.
been initialized. This can contain useful information that can vary based on
the value of `type`. For instance, for the `GETADDRINFOREQWRAP` resource type,
`resource` provides the hostname used when looking up the IP address for the
hostname in `net.Server.listen()`. The API for accessing this information is
host in `net.Server.listen()`. The API for accessing this information is
currently not considered public, but using the Embedder API, users can provide
and document their own resource objects. For example, such a resource object
could contain the SQL query being executed.
Expand Down
14 changes: 7 additions & 7 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ proxy.listen(1337, '127.0.0.1', () => {
// make a request to a tunneling proxy
const options = {
port: 1337,
hostname: '127.0.0.1',
host: '127.0.0.1',
method: 'CONNECT',
path: 'www.google.com:80'
};
Expand Down Expand Up @@ -415,7 +415,7 @@ event is emitted with a callback containing an object with a status code.
const http = require('http');

const options = {
hostname: '127.0.0.1',
host: '127.0.0.1',
port: 8080,
path: '/length_request'
};
Expand Down Expand Up @@ -502,7 +502,7 @@ srv.listen(1337, '127.0.0.1', () => {
// make a request
const options = {
port: 1337,
hostname: '127.0.0.1',
host: '127.0.0.1',
headers: {
'Connection': 'Upgrade',
'Upgrade': 'websocket'
Expand Down Expand Up @@ -1898,14 +1898,14 @@ changes:
* `host` {string} A domain name or IP address of the server to issue the
request to. **Default:** `'localhost'`.
* `hostname` {string} Alias for `host`. To support [`url.parse()`][],
`hostname` is preferred over `host`.
* `family` {number} IP address family to use when resolving `host` and
`hostname` will be used if both `host` and `hostname` are specified.
* `family` {number} IP address family to use when resolving `host` or
`hostname`. Valid values are `4` or `6`. When unspecified, both IP v4 and
v6 will be used.
* `port` {number} Port of remote server. **Default:** `80`.
* `localAddress` {string} Local interface to bind for network connections.
* `socketPath` {string} Unix Domain Socket (use one of `host:port` or
`socketPath`).
* `socketPath` {string} Unix Domain Socket (cannot be used if one of `host`
or `port` is specified, those specify a TCP Socket).
* `method` {string} A string specifying the HTTP request method. **Default:**
`'GET'`.
* `path` {string} Request path. Should include query string if any.
Expand Down
5 changes: 3 additions & 2 deletions doc/api/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -811,14 +811,15 @@ decrease overall server throughput.
added: v0.8.4
-->

* `hostname` {string} The hostname to verify the certificate against
* `hostname` {string} The host name or IP address to verify the certificate
against.
* `cert` {Object} An object representing the peer's certificate. The returned
object has some properties corresponding to the fields of the certificate.
* Returns: {Error|undefined}

Verifies the certificate `cert` is issued to `hostname`.

Returns {Error} object, populating it with the reason, host, and cert on
Returns {Error} object, populating it with `reason`, `host`, and `cert` on
failure. On success, returns {undefined}.

This function can be overwritten by providing alternative function as part of
Expand Down