Skip to content
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 defaults #1518

Merged
merged 2 commits into from Mar 30, 2015
Merged

Fix defaults #1518

merged 2 commits into from Mar 30, 2015

Conversation

simov
Copy link
Member

@simov simov commented Mar 29, 2015

Fixes #1509

Introduced in #1429 #1430 follow up #1435

Related to this bug as well #1515

Calling a convenience method from default object wasn't using the defaults properties, because the method was not wrapped, and therefore the extend logic wasn't called at all.

Then I'm temporarily passing a string to the wrap function so that I can make the head-body check before calling the requester just to satisfy the https://github.com/request/request/blob/master/tests/test-defaults.js#L265 test.

I'm going to improve the entire defaults related logic in index.js after this PR got merged in, because it's extremely hard to follow and obviously too error prone.

simov added a commit that referenced this pull request Mar 30, 2015
@simov simov merged commit 2284e7d into request:master Mar 30, 2015
@simov simov mentioned this pull request Mar 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

options.uri is a required argument when using default uri
1 participant