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

Co-authored-by: mscdex <[email protected]>

fix added version

Update doc/api/deprecations.md

Co-authored-by: James M Snell <[email protected]>
  • Loading branch information
rexagod and jasnell committed Dec 29, 2020
1 parent e57d8af commit 9444560
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
Original file line number Diff line number Diff line change
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="DEP0XXX"></a>
### DEP0XXX: `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
Original file line number Diff line number Diff line change
Expand Up @@ -1972,6 +1972,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 @@ -2730,6 +2740,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 9444560

Please sign in to comment.