Skip to content

Commit

Permalink
doc: add documentation for the 'timeout' event
Browse files Browse the repository at this point in the history
Adds the `'timeout'` event to the `http.ClientRequest` documentation.

PR-URL: #15443
Fixes: #14856
Reviewed-By: Gibson Fahnestock <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
lpinca authored and jasnell committed Sep 20, 2017
1 parent d82ae0c commit 7fa2bee
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,16 @@ added: v0.5.3

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'
<!-- YAML
added: v0.1.94
Expand Down Expand Up @@ -1909,6 +1919,7 @@ const req = http.request(options, (res) => {
[`net.Socket`]: net.html#net_class_net_socket
[`net.createConnection()`]: net.html#net_net_createconnection_options_connectlistener
[`request.end()`]: #http_request_end_data_encoding_callback
[`request.setTimeout()`]: #http_request_settimeout_timeout_callback
[`request.socket`]: #http_request_socket
[`request.socket.getPeerCertificate()`]: tls.html#tls_tlssocket_getpeercertificate_detailed
[`request.write(data, encoding)`]: #http_request_write_chunk_encoding_callback
Expand Down

0 comments on commit 7fa2bee

Please sign in to comment.