Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
doc: add http.IncomingMessage#connection
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
Showing
2 changed files
with
26 additions
and
0 deletions .
+15
−0
doc/api/deprecations.md
+11
−0
doc/api/http.md
@@ -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
@@ -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
@@ -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
@@ -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
Toggle all file notes
Toggle all file annotations