diff options
author | dr-js <dr@dr.run> | 2021-01-19 02:55:57 +0300 |
---|---|---|
committer | Matteo Collina <hello@matteocollina.com> | 2021-09-27 13:43:58 +0300 |
commit | 4b030d057375e58d2e99182f6ef7aa70f6ebcf99 (patch) | |
tree | 4408a747f88ae55cf15a86e639f098e4db15e239 /doc/api/http.md | |
parent | 44b173e01346c679f8b8c0ec26fd041b02c46bca (diff) |
doc: deprecate (doc-only) http abort related
Refs: https://github.com/nodejs/node/pull/36641
Refs: https://github.com/nodejs/node/issues/36617#issuecomment-751443964
Documentation-only deprecate `.aborted` property and `'abort'`,
`'aborted'` event in `http`, and suggest using the corresponding
Stream API instead.
Co-authored-by: Michaƫl Zasso <targos@protonmail.com>
Co-authored-by: Rich Trott <rtrott@gmail.com>
Co-authored-by: Robert Nagy <ronagy@icloud.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/36670
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'doc/api/http.md')
-rw-r--r-- | doc/api/http.md | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/doc/api/http.md b/doc/api/http.md index af68e710037..3fb6d398330 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -407,8 +407,11 @@ body which has been transmitted are equal or not. ### Event: `'abort'` <!-- YAML added: v1.4.1 +deprecated: REPLACEME --> +> Stability: 0 - Deprecated. Listen for the `'close'` event instead. + Emitted when the request has been aborted by the client. This event is only emitted on the first call to `abort()`. @@ -564,7 +567,7 @@ added: v0.7.8 --> Emitted when the underlying socket times out from inactivity. This only notifies -that the socket has been idle. The request must be aborted manually. +that the socket has been idle. The request must be destroyed manually. See also: [`request.setTimeout()`][]. @@ -645,12 +648,15 @@ in the response to be dropped and the socket to be destroyed. ### `request.aborted` <!-- YAML added: v0.11.14 +deprecated: REPLACEME changes: - version: v11.0.0 pr-url: https://github.com/nodejs/node/pull/20230 description: The `aborted` property is no longer a timestamp number. --> +> Stability: 0 - Deprecated. Check [`request.destroyed`][] instead. + * {boolean} The `request.aborted` property will be `true` if the request has @@ -1988,8 +1994,11 @@ may be reused multiple times in case of keep-alive. ### Event: `'aborted'` <!-- YAML added: v0.3.8 +deprecated: REPLACEME --> +> Stability: 0 - Deprecated. Listen for `'close'` event instead. + Emitted when the request has been aborted. ### Event: `'close'` @@ -2002,8 +2011,11 @@ Indicates that the underlying connection was closed. ### `message.aborted` <!-- YAML added: v10.1.0 +deprecated: REPLACEME --> +> Stability: 0 - Deprecated. Check `message.destroyed` from {stream.Readable}. + * {boolean} The `message.aborted` property will be `true` if the request has @@ -3237,6 +3249,7 @@ try { [`outgoingMessage.socket`]: #outgoingmessagesocket [`removeHeader(name)`]: #requestremoveheadername [`request.destroy()`]: #requestdestroyerror +[`request.destroyed`]: #requestdestroyed [`request.end()`]: #requestenddata-encoding-callback [`request.flushHeaders()`]: #requestflushheaders [`request.getHeader()`]: #requestgetheadername |