mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
doc: document the 'close' and 'finish' events
These events are already documented as events of the `http.ServerResponse` class. Document that they can also be emitted on instances of the `http.ClientRequest` class. PR-URL: https://github.com/nodejs/node/pull/42704 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
This commit is contained in:
1 parent
d7265d8ae4
commit
b4b2a0f8b7
1 file changed
+20
@@ -434,6 +434,15 @@ deprecated: v16.12.0
|
||||
Emitted when the request has been aborted by the client. This event is only
|
||||
emitted on the first call to `abort()`.
|
||||
|
||||
### Event: `'close'`
|
||||
|
||||
<!-- YAML
|
||||
added: v0.5.4
|
||||
-->
|
||||
|
||||
Indicates that the request is completed, or its underlying connection was
|
||||
terminated prematurely (before the response completion).
|
||||
|
||||
### Event: `'connect'`
|
||||
|
||||
<!-- YAML
|
||||
@@ -519,6 +528,17 @@ Emitted when the server sends a '100 Continue' HTTP response, usually because
|
||||
the request contained 'Expect: 100-continue'. This is an instruction that
|
||||
the client should send the request body.
|
||||
|
||||
### Event: `'finish'`
|
||||
|
||||
<!-- YAML
|
||||
added: v0.3.6
|
||||
-->
|
||||
|
||||
Emitted when the request has been sent. More specifically, this event is emitted
|
||||
when the last segment of the response headers and body have been handed off to
|
||||
the operating system for transmission over the network. It does not imply that
|
||||
the server has received anything yet.
|
||||
|
||||
### Event: `'information'`
|
||||
|
||||
<!-- YAML
|
||||
|
||||
Reference in new issue
Block a user