diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -4,13 +4,14 @@ var xml2js = require('xml2js');
 var xmlParser = new xml2js.Parser({explicitArray: false});
 
 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);
         });
     };
Added `res.end()` call to the `req.on('end', ...` call to close the connection instantly instead of after a (long) timeout period.