node.js - request - How to “emitter.setMaxListeners()”?
问题 When I do a GET on a certain URI using the node.js 'request' module; var options = {uri:"aURI", headers:headerData}; request.get(options, function (error, response, body) { } The error message is: [Error: Exceeded maxRedirects. Probably stuck in a redirect loop.] and there is also the following message: "(node) warning: possible EventEmitter memory leak detected. 11 listeners added. Use emitter.setMaxListeners() to increase limit." How do I setMaxListeners ? 回答1: I strongly advice NOT to use