Browse Source

doc: add documentation for the 'timeout' event

Adds the `'timeout'` event to the `http.ClientRequest` documentation.

PR-URL: https://github.com/nodejs/node/pull/15443
Fixes: https://github.com/nodejs/node/issues/14856
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
canary-base
Luigi Pinca 8 years ago
committed by Ruben Bridgewater
parent
commit
784cdad740
No known key found for this signature in database GPG Key ID: F07496B3EB3C1762
  1. 11
      doc/api/http.md

11
doc/api/http.md

@ -427,6 +427,16 @@ added: v0.5.3
Emitted after a socket is assigned to this request. Emitted after a socket is assigned to this request.
### Event: 'timeout'
<!-- YAML
added: v0.7.8
-->
Emitted when the underlying socket times out from inactivity. This only notifies
that the socket has been idle. The request must be aborted manually.
See also: [`request.setTimeout()`][]
### Event: 'upgrade' ### Event: 'upgrade'
<!-- YAML <!-- YAML
added: v0.1.94 added: v0.1.94
@ -1966,6 +1976,7 @@ const req = http.request(options, (res) => {
[`net.createConnection()`]: net.html#net_net_createconnection_options_connectlistener [`net.createConnection()`]: net.html#net_net_createconnection_options_connectlistener
[`removeHeader(name)`]: #requestremoveheadername [`removeHeader(name)`]: #requestremoveheadername
[`request.end()`]: #http_request_end_data_encoding_callback [`request.end()`]: #http_request_end_data_encoding_callback
[`request.setTimeout()`]: #http_request_settimeout_timeout_callback
[`request.socket`]: #http_request_socket [`request.socket`]: #http_request_socket
[`request.socket.getPeerCertificate()`]: tls.html#tls_tlssocket_getpeercertificate_detailed [`request.socket.getPeerCertificate()`]: tls.html#tls_tlssocket_getpeercertificate_detailed
[`request.write(data, encoding)`]: #http_request_write_chunk_encoding_callback [`request.write(data, encoding)`]: #http_request_write_chunk_encoding_callback

Loading…
Cancel
Save