var https = require('https'),
	_ = require('underscore');
function get(response, command) {
	var options = {
		hostname: 'poloniex.com',
		path: '/public?command=' + command,
		method: 'GET'
	};
	var req = https.request(options, function (res) {
		res.setEncoding('utf8');
		res.on('data', function (chunk) {
			response.write(chunk);
		});
	});
	req.end();
	
	response.setTimeout(3000, function () {
		response.end();
	})
}
exports.get = get;
Ответ большой и Node.js записывает его порциями. Как понять, что запись закончилась и можно завершить response? Пока завершаю его по таймауту.