ramv/node-elastical — pull request #1 by Filirom1 (2012-09-11 11:10:23+00:00)
Title: set request options

Hi,

I would like to change the default agent of Elastical to this one :

To do it, I need to set request options.

var Agent = require('agentkeepalive');

var keepaliveAgent = new Agent({
maxSockets: 10,
maxKeepAliveRequests: 0, // max requests per keepalive socket, default is 0, no limit.
maxKeepAliveTime: 30000 // keepalive for 30 seconds
});

var client = new elastical.Client({agent: keepaliveAgent })

I set a list of allowed options, tell me if it's ok for you :

[ 'timeout',
'pool',
'agent',
'headers',
'followRedirect',
'followAllRedirects',
'proxy',
'oauth',
'strictSSL',
'jar']

Cheers
Romain