Expose http.getAgent

This commit is contained in:
Ryan Dahl 2011-01-21 13:47:27 -08:00
parent db8736ad93
commit b9574b995f
3 changed files with 4 additions and 1 deletions

View 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'

View File

@ -1148,6 +1148,7 @@ function getAgent(host, port) {
return agent;
}
exports.getAgent = getAgent;
exports._requestFromAgent = function(agent, options, cb) {

View File

@ -55,6 +55,7 @@ function getAgent(options) {
return agent;
}
exports.getAgent = getAgent;
exports.request = function(options, cb) {