Skip to content

Commit 4f2aec3

Browse files
committed
doc: add information for IncomingMessage.destroy()
Add documentation for `http.IncomingMessage.prototype.destroy()`. PR-URL: #7237 Fixes: #4226 Reviewed-By: James M Snell <[email protected]> Reviewed-By: cjihrig - Colin Ihrig <[email protected]>
1 parent 197a465 commit 4f2aec3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

doc/api/http.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -910,6 +910,14 @@ following additional events, methods, and properties.
910910
Indicates that the underlying connection was closed.
911911
Just like `'end'`, this event occurs only once per response.
912912

913+
### message.destroy([error])
914+
915+
* `error` {Error}
916+
917+
Calls `destroy()` on the socket that received the `IncomingMessage`. If `error`
918+
is provided, an `'error'` event is emitted and `error` is passed as an argument
919+
to any listeners on the event.
920+
913921
### message.headers
914922

915923
The request/response headers object.

0 commit comments

Comments
 (0)