doc: document callback of http res/req end method
authorJackson Tian <puling.tyq@alibaba-inc.com>
Thu, 18 Dec 2014 07:52:42 +0000 (15:52 +0800)
committerBen Noordhuis <info@bnoordhuis.nl>
Thu, 18 Dec 2014 18:39:30 +0000 (19:39 +0100)
Add documentation for the callback parameter of http.ClientRequest's and
http.ServerResponse's end methods.

PR-URL: https://github.com/iojs/io.js/pull/181
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Brendan Ashworth <squirrelslikeacorns@gmail.com>
doc/api/http.markdown

index c639bdfd5d97942e5c93ee57ca720f0c8d5500cc..3d482b441c80d3cf03fa3753d6191190e9da707b 100644 (file)
@@ -444,6 +444,8 @@ response.
 If `data` is specified, it is equivalent to calling
 `response.write(data, encoding)` followed by `response.end(callback)`.
 
+If `callback` is specified, it will be called when the response stream
+is finished.
 
 ## http.request(options[, callback])
 
@@ -890,6 +892,9 @@ chunked, this will send the terminating `'0\r\n\r\n'`.
 If `data` is specified, it is equivalent to calling
 `request.write(data, encoding)` followed by `request.end(callback)`.
 
+If `callback` is specified, it will be called when the request stream
+is finished.
+
 ### request.abort()
 
 Aborts a request.  (New since v0.3.8.)