Expose http.getAgent
authorRyan Dahl <ry@tinyclouds.org>
Fri, 21 Jan 2011 21:47:27 +0000 (13:47 -0800)
committerRyan Dahl <ry@tinyclouds.org>
Fri, 21 Jan 2011 21:47:27 +0000 (13:47 -0800)
doc/api/http.markdown
lib/http.js
lib/https.js

index e818582..b21314b 100644 (file)
@@ -394,11 +394,12 @@ Example:
 
 
 ## http.Agent
+## http.getAgent(host, port)
 
 `http.request()` uses a special `Agent` for managing multiple connections to
 an HTTP server. Normally `Agent` instances should not be exposed to user
 code, however in certain situations it's useful to check the status of the
-agent.
+agent. The `http.getAgent()` function allows you to access the agents.
 
 ### Event: 'upgrade'
 
index 6e4a066..17b8f00 100644 (file)
@@ -1148,6 +1148,7 @@ function getAgent(host, port) {
 
   return agent;
 }
+exports.getAgent = getAgent;
 
 
 exports._requestFromAgent = function(agent, options, cb) {
index aaa070a..1b161e6 100644 (file)
@@ -55,6 +55,7 @@ function getAgent(options) {
 
   return agent;
 }
+exports.getAgent = getAgent;
 
 
 exports.request = function(options, cb) {