Permalink
Browse files

Expose the response object

  • Loading branch information...
1 parent 8be661a commit 5ef1f13b3af99d719d9ec506b4b98363f077f617 @chriso chriso committed Feb 7, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/node.io/request.js
View
@@ -77,11 +77,11 @@ Job.prototype.getHtml = function (resource, headers, callback, parse) {
headers = default_headers;
}
- this.get(resource, headers, function (err, data, headers) {
+ this.get(resource, headers, function (err, data, headers, response) {
if (err) {
callback(err);
} else {
- self.parseHtml(data, callback, headers);
+ self.parseHtml(data, callback, response);
}
}, parse);
};
@@ -111,11 +111,11 @@ Job.prototype.postHtml = function (resource, body, headers, callback, parse) {
headers = default_headers;
}
- this.post(resource, body, headers, function (err, data, headers) {
+ this.post(resource, body, headers, function (err, data, headers, response) {
if (err) {
callback(err);
} else {
- self.parseHtml(data, callback, headers);
+ self.parseHtml(data, callback, response);
}
}, parse);
};
@@ -323,7 +323,7 @@ Job.prototype.doRequest = function (method, resource, body, headers, callback, p
}
var parse_callback = function (err, data) {
- callback(null, data, response.headers);
+ callback(null, data, response.headers, response);
};
if (!parse) {

0 comments on commit 5ef1f13

Please sign in to comment.