We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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:
https://github.com/visionmedia/superagent/blob/66aed3427f29bf0c09b1df0e7f8aa9f0e30732ab/lib/node/agent.js#L83
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.
The text was updated successfully, but these errors were encountered:
Fix for issue chaijs#214, request defaults not set when using Agent.
d712aa8
See PR #215 for my best suggestion, it fixes my use case but I am not familiar enough with superagent and chai-http to be totally sure.
Sorry, something went wrong.
fix: Request defaults not set when using Agent, issue chaijs#214.
bf38a51
8c1e530
35c403b
No branches or pull requests
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:
https://github.com/visionmedia/superagent/blob/66aed3427f29bf0c09b1df0e7f8aa9f0e30732ab/lib/node/agent.js#L83
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.
The text was updated successfully, but these errors were encountered: