Multiple responses on node.js restler call
问题 I've created a library for sending REST requests: var rest = require('restler'); module.exports = { beginSession: function() { var options = { method: "GET", query: {begin_session: '1'}}; rest.get('http://countly/i', options). on('complete', function(data, response){ console.log('Status: ' + response.statusCode); }); } }; The problem is that every time I use the library and the call is responded, the 'on complete' is called multiple times: 1st use of method will call 'on complete' just once,