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

11 lines
176 B
JavaScript

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