From 3c300c70160993666497e71d2184f2b82803328b 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()`. PR-URL: https://github.com/nodejs/node/pull/7237 Fixes: https://github.com/nodejs/node/issues/4226 Reviewed-By: James M Snell Reviewed-By: cjihrig - Colin Ihrig --- doc/api/http.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/api/http.md b/doc/api/http.md index 4723ebfcd1c12d..ac86fa41e5b833 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -874,6 +874,14 @@ socket has closed. 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 emitted and `error` is passed as an argument +to any listeners on the event. + ### message.headers The request/response headers object.