parsexmlresponse
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -7,9 +7,10 @@ "use strict"; | ||
module.exports = function (callback) { | ||
return function xmlHttpResponse(res) { | ||
return function xmlHttpResponse(req, res) { | ||
var body = ''; | ||
res.setEncoding('utf8'); | ||
res.on('data', function (chunk) { | ||
req.setEncoding('utf8'); | ||
req.on('data', function (chunk) { | ||
body += chunk; | ||
}); | ||
res.on('end', function () { | ||
req.on('end', function () { | ||
res.end() | ||
xmlParser.parseString(body, callback); | ||
@@ -16,0 +17,0 @@ }); |
@@ -7,3 +7,3 @@ { | ||
"description": "Library to spool HTTP responses with an XML body and convert to a javascript object.", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"main": "index.js", | ||
@@ -10,0 +10,0 @@ "directories": { |
3064
16