From 7097eca5a76cc169fcd6e927a15dcd879fb61c0c Mon Sep 17 00:00:00 2001 From: Kip Gebhardt Date: Tue, 28 Jun 2011 12:50:42 -0700 Subject: [PATCH] Adding documentation for 'agent' option in http.request(). Fixes #1243. --- doc/api/http.markdown | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/api/http.markdown b/doc/api/http.markdown index 153b8e8..7fe5240 100644 --- a/doc/api/http.markdown +++ b/doc/api/http.markdown @@ -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 -- 2.7.4