From 8a93b63a6b5dcb14ddeaea000d659ad62a7f1476 Mon Sep 17 00:00:00 2001 From: Trivikram Kamat <16024985+trivikr@users.noreply.github.com> Date: Wed, 21 Aug 2019 13:11:16 -0700 Subject: [PATCH] doc,http: add extends for derived classes Also removed redundant statments as extends is self-explanatory. PR-URL: https://github.com/nodejs/node/pull/29255 Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- doc/api/http.md | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/doc/api/http.md b/doc/api/http.md index 1d1768f066518c..4417e20e88fc36 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -295,6 +295,8 @@ agent. Do not modify. added: v0.1.17 --> +* Extends: {Stream} + This object is created internally and returned from [`http.request()`][]. It represents an _in-progress_ request whose header has already been queued. The header is still mutable using the [`setHeader(name, value)`][], @@ -325,9 +327,6 @@ Unlike the `request` object, if the response closes prematurely, the Node.js does not check whether Content-Length and the length of the body which has been transmitted are equal or not. -The request inherits from [Stream][], and additionally implements the -following: - ### Event: 'abort' -This class inherits from [`net.Server`][] and has the following additional -events: +* Extends: {net.Server} ### Event: 'checkContinue' +* Extends: {Stream} + This object is created internally by an HTTP server — not by the user. It is passed as the second parameter to the [`'request'`][] event. -The response inherits from [Stream][], and additionally implements the -following: - ### Event: 'close' +* Extends: {stream.Readable} + An `IncomingMessage` object is created by [`http.Server`][] or [`http.ClientRequest`][] and passed as the first argument to the [`'request'`][] and [`'response'`][] event respectively. It may be used to access response status, headers and data. -It implements the [Readable Stream][] interface, as well as the -following additional events, methods, and properties. - ### Event: 'aborted'