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

Moving default adapter to global defaults #437

Merged
merged 1 commit into from Sep 22, 2016

Conversation

@rubennorte
Copy link
Member

commented Sep 5, 2016

I expect that this PR will make easier for the developers to debug which is the default adapter for a given environment and also to decorate them with any additional functionality.

@coveralls

This comment has been minimized.

Copy link

commented Sep 5, 2016

Coverage Status

Coverage increased (+0.03%) to 93.979% when pulling b274587 on rubennorte:adapters-in-global-defaults into 755a9b3 on mzabriskie:master.

response.headers,
var adapter = config.adapter || defaults.adapter;

return adapter(config).then(function onAdapterResolution(response) {

This comment has been minimized.

Copy link
@mzabriskie

mzabriskie Sep 12, 2016

Member

What happens if config.adapter or defaults.adapter end up not being a function? In the previous if/else for selecting an adapter you always had a fallback in case config.adapter supplied something invalid.

This comment has been minimized.

Copy link
@rubennorte

rubennorte Sep 12, 2016

Author Member

I think we better detect it at this point rather than falling back to any other implementation without errors. That way is much harder to debug, don't you think?

This comment has been minimized.

Copy link
@nickuraltsev

nickuraltsev Sep 12, 2016

Member

I agree with @rubennorte. Silently falling back to another adapter is not going to make anyone's life easier.

@dan-turner

This comment has been minimized.

Copy link

commented Sep 14, 2016

Any updates with this one?

@mzabriskie mzabriskie merged commit b718ebf into axios:master Sep 22, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.