diff --git a/index.js b/index.js index 799fa8b..70542d4 100644 --- a/index.js +++ b/index.js @@ -8,6 +8,7 @@ module.exports = Response; * @param {Number} statusCode * @param {Object} headers * @param {Buffer} body + * @param {String} url */ function Response(statusCode, headers, body, url) { if (typeof statusCode !== 'number') { @@ -35,6 +36,7 @@ Response.prototype.getBody = function (encoding) { err.statusCode = this.statusCode; err.headers = this.headers; err.body = this.body; + err.url = this.url; throw err; } return encoding ? this.body.toString(encoding) : this.body;