Skip to content

Commit

Permalink
Remove forever option warning and improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
simov committed Jul 17, 2015
1 parent 5cdfe8e commit 391b80b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -775,7 +775,7 @@ The first argument can be either a `url` or an `options` object. The only requir
- `agent` - `http(s).Agent` instance to use
- `agentClass` - alternatively specify your agent's class name
- `agentOptions` - and pass its options. **Note:** for HTTPS see [tls API doc for TLS/SSL options](http://nodejs.org/api/tls.html#tls_tls_connect_options_callback) and the [documentation above](#using-optionsagentoptions).
- `forever` - set to `true` to use the [forever-agent](https://github.com/request/forever-agent) **Use only with node 0.10-**
- `forever` - set to `true` to use the [forever-agent](https://github.com/request/forever-agent) **Note:** Defaults to `http(s).Agent({keepAlive:true})` in node 0.12+
- `pool` - An object describing which agents to use for the request. If this option is omitted the request will use the global agent (as long as your options allow for it). Otherwise, request will search the pool for your custom agent. If no custom agent is found, a new agent will be created and added to the pool. **Note:** `pool` is used only when the `agent` option is not specified.
- A `maxSockets` property can also be provided on the `pool` object to set the max number of sockets for all agents created (ex: `pool: {maxSockets: Infinity}`).
- Note that if you are sending multiple requests in a loop and creating
Expand Down
1 change: 0 additions & 1 deletion request.js
Expand Up @@ -483,7 +483,6 @@ Request.prototype.init = function (options) {
if (v.major === 0 && v.minor <= 10) {
self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL
} else {
console.warn('The forever option defaults to using http(s).Agent in 0.12+')
self.agent = new self.httpModule.Agent({
keepAlive: true,
maxSockets: (options.pool && options.pool.maxSockets) || Infinity
Expand Down

0 comments on commit 391b80b

Please sign in to comment.