nodejs request - toString failed - buffer size issue for big files (maxBufferSize)
<p>I'm requesting a big file with 150K records but it throws 'toString failed' error. <a href="https://github.com/nodejs/node/issues/3175" rel="nofollow">nodejs/node#3175</a> says it's because of maxBufferSize. Request works well for 200 records but its an external api and the requirement is to get all records at once.[no pagination there :( ]
Is there any way to set buffersize for this request?</p>

<p>I already asked this question <a href="https://github.com/request/request/issues/2067" rel="nofollow">here</a></p>

<p>EDIT:</p>

<pre><code>request("http://www.site-containing-big-data/api",
        function (error, response, body) {
            console.log('got something to show');
            if(!error &amp;&amp; response.statusCode == 200) {
                resolve(body);
            }else if(error){
                reject(error);
            }
        });
</code></pre>

<p>but nothing shows in console other than <code>toString failed</code> message</p>