Open
Description
Code like this does not work:
var agent = chai.request.agent(urls.central).auth(su.username, su.password);
The default auth is NOT used in subsequent requests made with this agent, contrary to the superagent documentation at http://visionmedia.github.io/superagent/#agents-for-global-state
If you look at this line of SuperAgent:
You see the call to _setDefaults.
The corresponding code in chai-http, https://github.com/chaijs/chai-http/blob/master/lib/request.js#L323 where it overrides the methods, is missing this call to setDefaults.
Metadata
Metadata
Assignees
Labels
No labels