Files
cdnjs/node_modules/superagent/lib/node/parsers/text.js
T
2014-07-17 01:32:32 +08:00

7 lines
161 B
JavaScript

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