doc: explain ClientRequest#setTimeout time unit
authorBen Ripkens <bripkens.dev@gmail.com>
Mon, 28 Dec 2015 23:10:21 +0000 (00:10 +0100)
committerMyles Borins <mborins@us.ibm.com>
Tue, 19 Jan 2016 19:52:34 +0000 (11:52 -0800)
State a time unit for the timeout parameter in ClientRequest#setTimeout

PR-URL: https://github.com/nodejs/node/pull/4458
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
doc/api/http.markdown

index 6562a46..f62b248 100644 (file)
@@ -375,6 +375,9 @@ Once a socket is assigned to this request and is connected
 Once a socket is assigned to this request and is connected
 [`socket.setTimeout()`][] will be called.
 
+* `timeout` {Number} Milliseconds before a request is considered to be timed out.
+* `callback` {Function} Optional function to be called when a timeout occurs. Same as binding to the `timeout` event.
+
 ### request.write(chunk[, encoding][, callback])
 
 Sends a chunk of the body.  By calling this method