This fixes the issue whereby if request.url is modified in a plugin for an agent (eg. superagent-prefix), cookies are not preserved across different requests, using that agent (see issue #1164).
This is fixed by simply executing agent._attachCookies() after agent._setDefaults().
This fixes the issue whereby if request.url is modified in a plugin for an agent (eg. superagent-prefix), cookies are not preserved across different requests, using that agent (see issue #1164).
This is fixed by simply executing agent._attachCookies() after agent._setDefaults().
Note: this is my first pull request ever.