From 20ab480847490d20cab6225be6db386e8cc9a48d Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 8 Jun 2016 16:23:21 -0700 Subject: [PATCH] doc: add information for IncomingMessage.destroy() Add documentation for `http.IncomingMessage.prototype.destroy()`. Fixes: https://github.com/nodejs/node/issues/4226 --- doc/api/http.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/api/http.md b/doc/api/http.md index 0b5e75aeabe2cc..e7430cb6545f0d 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -910,6 +910,14 @@ following additional events, methods, and properties. Indicates that the underlying connection was closed. Just like `'end'`, this event occurs only once per response. +### message.destroy(error) + +* `error` {Error} + +Calls `.destroy()` on the socket that received the `IncomingMessage`. If `error` +is provided, an `'error'` event is fired and `error` is passed as an argument to +any listeners on the event. + ### message.headers The request/response headers object.