diff --git a/README.md b/README.md index 77e3e1e27..b72276798 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/request.js b/request.js index 3664f9ea3..6932741c5 100644 --- a/request.js +++ b/request.js @@ -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