aboutsummaryrefslogtreecommitdiff
path: root/node_modules/superagent/lib/node/parsers/text.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/superagent/lib/node/parsers/text.js')
-rw-r--r--node_modules/superagent/lib/node/parsers/text.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/node_modules/superagent/lib/node/parsers/text.js b/node_modules/superagent/lib/node/parsers/text.js
new file mode 100644
index 0000000..03575c6
--- /dev/null
+++ b/node_modules/superagent/lib/node/parsers/text.js
@@ -0,0 +1,7 @@
+
+module.exports = function(res, fn){
+ res.text = '';
+ res.setEncoding('utf8');
+ res.on('data', function(chunk){ res.text += chunk; });
+ res.on('end', fn);
+}; \ No newline at end of file