Permalink
Browse files

Expose http.getAgent

  • Loading branch information...
1 parent db8736a commit b9574b995fb48219d8f4e1641f8730e10f2c9f3c @ry ry committed Jan 21, 2011
Showing with 4 additions and 1 deletion.
  1. +2 −1 doc/api/http.markdown
  2. +1 −0 lib/http.js
  3. +1 −0 lib/https.js
View
@@ -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'
View
@@ -1148,6 +1148,7 @@ function getAgent(host, port) {
return agent;
}
+exports.getAgent = getAgent;
exports._requestFromAgent = function(agent, options, cb) {
View
@@ -55,6 +55,7 @@ function getAgent(options) {
return agent;
}
+exports.getAgent = getAgent;
exports.request = function(options, cb) {

0 comments on commit b9574b9

Please sign in to comment.