New issue
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
Fix recursive requester #1430
Fix recursive requester #1430
Conversation
This is nice work, thank you for the PRs and for including tests 💚 I'll nominate it for $30 bounty if you're interested. I'd rather see us use |
|
||
defaultsOne.get(s.url + '/get_recursive1', function (e, r, b) { | ||
t.equal(e, null) | ||
t.equal(b, 'TESTING!') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
t.deepEqual(r.request.headers, {foo: 'bar1'})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is being asserted over here: https://github.com/tikotzky/request/blob/fix-recursive-requester/tests/test-defaults.js#L65
@nylen thanks for the offer of bounty nomination, but I'll pass on that for now. As for changing to use Changing that to use |
@nylen can this get merged now? |
Refactor test-default tests (according to comments in #1430)
Right now if you set a
requester
function inrequest.defaults
it will override all further definedrequester
functions when usingrequest.METHOD
to make a request. For exampleThis PR fixes
request.defaults
so that recursiverequester
functions will get called by bothrequest()
andrequest.METHOD()