Skip to content

Commit 5ae5ca9

Browse files
rexagodjasnell
authored andcommitted
doc: add http.IncomingMessage#connection
Refs: #33715 * link message.socket * deprecate * update doc/api/http.md PR-URL: #33768 Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent d8f535b commit 5ae5ca9

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

doc/api/deprecations.md

+15
Original file line numberDiff line numberDiff line change
@@ -2699,6 +2699,19 @@ resolutions not in `node_modules`. This means there will not be deprecation
26992699
warnings for `"exports"` in dependencies. With `--pending-deprecation`, a
27002700
runtime warning results no matter where the `"exports"` usage occurs.
27012701

2702+
<a id="DEP0148"></a>
2703+
### DEP0148: `http.IncomingMessage#connection`
2704+
<!-- YAML
2705+
changes:
2706+
- version: REPLACEME
2707+
pr-url: https://github.com/nodejs/node/pull/33768
2708+
description: Documentation-only deprecation.
2709+
-->
2710+
2711+
Type: Documentation-only.
2712+
2713+
Prefer [`message.socket`][] over [`message.connection`][].
2714+
27022715
[Legacy URL API]: url.md#url_legacy_url_api
27032716
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
27042717
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
@@ -2757,6 +2770,8 @@ runtime warning results no matter where the `"exports"` usage occurs.
27572770
[`http.request()`]: http.md#http_http_request_options_callback
27582771
[`https.get()`]: https.md#https_https_get_options_callback
27592772
[`https.request()`]: https.md#https_https_request_options_callback
2773+
[`message.connection`]: http.md#http_message_connection
2774+
[`message.socket`]: http.md#http_message_socket
27602775
[`module.createRequire()`]: module.md#module_module_createrequire_filename
27612776
[`os.networkInterfaces()`]: os.md#os_os_networkinterfaces
27622777
[`os.tmpdir()`]: os.md#os_os_tmpdir

doc/api/http.md

+11
Original file line numberDiff line numberDiff line change
@@ -1984,6 +1984,16 @@ const req = http.request({
19841984
});
19851985
```
19861986

1987+
### `message.connection`
1988+
<!-- YAML
1989+
added: v0.1.90
1990+
deprecated: REPLACEME
1991+
-->
1992+
1993+
> Stability: 0 - Deprecated. Use [`message.socket`][].
1994+
1995+
Alias for [`message.socket`][].
1996+
19871997
### `message.destroy([error])`
19881998
<!-- YAML
19891999
added: v0.3.0
@@ -2742,6 +2752,7 @@ try {
27422752
[`net.Socket`]: net.md#net_class_net_socket
27432753
[`net.createConnection()`]: net.md#net_net_createconnection_options_connectlistener
27442754
[`new URL()`]: url.md#url_new_url_input_base
2755+
[`message.socket`]: #http_message_socket
27452756
[`removeHeader(name)`]: #http_request_removeheader_name
27462757
[`request.end()`]: #http_request_end_data_encoding_callback
27472758
[`request.destroy()`]: #http_request_destroy_error

0 commit comments

Comments
 (0)