diff --git a/lib/agent.js b/lib/agent.js index 0afb7c7..8adf984 100644 --- a/lib/agent.js +++ b/lib/agent.js @@ -55,8 +55,8 @@ methods.forEach(function(method) { req.on('response', this._saveCookies.bind(this)); req.on('redirect', this._saveCookies.bind(this)); req.on('redirect', this._attachCookies.bind(this, req)); - this._attachCookies(req); this._setDefaults(req); + this._attachCookies(req); return req; };