GT2/GT2-Android/node_modules/superagent/lib/node/parsers/text.js

11 lines
176 B
JavaScript
Raw Normal View History

'use strict';
module.exports = function(res, fn){
res.text = '';
res.setEncoding('utf8');
res.on('data', chunk => {
res.text += chunk;
});
res.on('end', fn);
};