Skip to content

Commit

Permalink
doc: add http.IncomingMessage#connection
Browse files Browse the repository at this point in the history
Refs: #33715

* link message.socket
* deprecate
* update doc/api/http.md

PR-URL: #33768
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • Loading branch information
rexagod authored and jasnell committed Jan 9, 2021
1 parent d8f535b commit 5ae5ca9
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
15 changes: 15 additions & 0 deletions doc/api/deprecations.md
Expand Up @@ -2699,6 +2699,19 @@ resolutions not in `node_modules`. This means there will not be deprecation
warnings for `"exports"` in dependencies. With `--pending-deprecation`, a
runtime warning results no matter where the `"exports"` usage occurs.

<a id="DEP0148"></a>
### DEP0148: `http.IncomingMessage#connection`
<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/33768
description: Documentation-only deprecation.
-->

Type: Documentation-only.

Prefer [`message.socket`][] over [`message.connection`][].

[Legacy URL API]: url.md#url_legacy_url_api
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
Expand Down Expand Up @@ -2757,6 +2770,8 @@ runtime warning results no matter where the `"exports"` usage occurs.
[`http.request()`]: http.md#http_http_request_options_callback
[`https.get()`]: https.md#https_https_get_options_callback
[`https.request()`]: https.md#https_https_request_options_callback
[`message.connection`]: http.md#http_message_connection
[`message.socket`]: http.md#http_message_socket
[`module.createRequire()`]: module.md#module_module_createrequire_filename
[`os.networkInterfaces()`]: os.md#os_os_networkinterfaces
[`os.tmpdir()`]: os.md#os_os_tmpdir
Expand Down
11 changes: 11 additions & 0 deletions doc/api/http.md
Expand Up @@ -1984,6 +1984,16 @@ const req = http.request({
});
```

### `message.connection`
<!-- YAML
added: v0.1.90
deprecated: REPLACEME
-->

> Stability: 0 - Deprecated. Use [`message.socket`][].
Alias for [`message.socket`][].

### `message.destroy([error])`
<!-- YAML
added: v0.3.0
Expand Down Expand Up @@ -2742,6 +2752,7 @@ try {
[`net.Socket`]: net.md#net_class_net_socket
[`net.createConnection()`]: net.md#net_net_createconnection_options_connectlistener
[`new URL()`]: url.md#url_new_url_input_base
[`message.socket`]: #http_message_socket
[`removeHeader(name)`]: #http_request_removeheader_name
[`request.end()`]: #http_request_end_data_encoding_callback
[`request.destroy()`]: #http_request_destroy_error
Expand Down

0 comments on commit 5ae5ca9

Please sign in to comment.