Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2020-04-11 23:06:43 +0300
committercjihrig <cjihrig@gmail.com>2020-05-09 20:57:28 +0300
commitff6535a4331d611bf0d205ee23d88e100dce92b2 (patch)
treed4e34a25b729c7469dd5ae7c0be2212059281201 /doc/api/http.md
parentae34e4737a67f58cfd67f61bc0521b37805a9cfc (diff)
http: return this from IncomingMessage#destroy()
This commit updates IncomingMessage#destroy() to return `this` for consistency with other readable streams. PR-URL: https://github.com/nodejs/node/pull/32789 Fixes: https://github.com/nodejs/node/issues/32772 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'doc/api/http.md')
-rw-r--r--doc/api/http.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/api/http.md b/doc/api/http.md
index 1ac10261b33..364978855ee 100644
--- a/doc/api/http.md
+++ b/doc/api/http.md
@@ -1847,9 +1847,15 @@ const req = http.request({
### `message.destroy([error])`
<!-- YAML
added: v0.3.0
+changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/32789
+ description: The function returns `this` for consistency with other Readable
+ streams.
-->
* `error` {Error}
+* Returns: {this}
Calls `destroy()` on the socket that received the `IncomingMessage`. If `error`
is provided, an `'error'` event is emitted on the socket and `error` is passed