Skip to content

Commit 359e20f

Browse files
ronagtargos
authored andcommitted
doc: clarify when http emits aborted event
PR-URL: #28262 Refs: #28172 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 72f52a3 commit 359e20f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/api/http.md

+4
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,10 @@ Until the data is consumed, the `'end'` event will not fire. Also, until
318318
the data is read it will consume memory that can eventually lead to a
319319
'process out of memory' error.
320320

321+
Unlike the `request` object, if the response closes prematurely, the
322+
`response` object does not emit an `'error'` event but instead emits the
323+
`'aborted'` event.
324+
321325
Node.js does not check whether Content-Length and the length of the
322326
body which has been transmitted are equal or not.
323327

0 commit comments

Comments
 (0)