Browse Source

Expose http.getAgent

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
b9574b995f
  1. 3
      doc/api/http.markdown
  2. 1
      lib/http.js
  3. 1
      lib/https.js

3
doc/api/http.markdown

@ -394,11 +394,12 @@ Example:
## http.Agent ## http.Agent
## http.getAgent(host, port)
`http.request()` uses a special `Agent` for managing multiple connections to `http.request()` uses a special `Agent` for managing multiple connections to
an HTTP server. Normally `Agent` instances should not be exposed to user 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 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' ### Event: 'upgrade'

1
lib/http.js

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

1
lib/https.js

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

Loading…
Cancel
Save