Skip to content

Commit 8fbda01

Browse files
committed
doc: clarify when http emits aborted event
1 parent c1f0cbe commit 8fbda01

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/api/http.md

Lines changed: 4 additions & 0 deletions
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'` 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)