10 lines
185 B
JavaScript
10 lines
185 B
JavaScript
"use strict";
|
|
|
|
module.exports = function (res, fn) {
|
|
res.text = '';
|
|
res.setEncoding('utf8');
|
|
res.on('data', function (chunk) {
|
|
res.text += chunk;
|
|
});
|
|
res.on('end', fn);
|
|
}; |