Adding documentation for 'agent' option in http.request().
authorKip Gebhardt <kip.gebhardt@voxer.com>
Tue, 28 Jun 2011 19:50:42 +0000 (12:50 -0700)
committerkoichik <koichik@improvement.jp>
Wed, 13 Jul 2011 19:06:46 +0000 (04:06 +0900)
Fixes #1243.

doc/api/http.markdown

index 153b8e8..7fe5240 100644 (file)
@@ -393,6 +393,10 @@ Options:
 - `path`: Request path. Should include query string and fragments if any.
    E.G. `'/index.html?page=12'`
 - `headers`: An object containing request headers.
+- `agent`: Controls `Agent` behavior. Possible values:
+ - `undefined` (default): use default `Agent` for this host and port.
+ - `Agent` object: explicitly use the passed in `Agent`.
+ - `false`: explicitly generate a new `Agent` for this host and port. `Agent` will not be re-used.
 
 `http.request()` returns an instance of the `http.ClientRequest`
 class. The `ClientRequest` instance is a writable stream. If one needs to