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

Allow unsetting headers by passing null (#382) #1845

wants to merge 1 commit into
base: master


None yet
2 participants

codeclown commented Oct 21, 2018

Addresses #382.

First of all, deepMerge was always returning an object even if the latter value being merged was not an object. This was making it impossible to later detect that initially a null was passed in the request config.

Changing deepMerge propagated the behaviour to mergeConfig. No changes needed in mergeConfig.

Then, eventually in dispatchRequest I had to remove the null-valued headers. I imagine there would be need to do the same for also auth and proxy objects, as maybe similar behaviour (ability to unset a property by passing null) would be preferred?


This comment has been minimized.

tnorthcutt commented Dec 6, 2018

I would love to see this merged. For the time being I'm resorting to deleting a header manually, but that feels... wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment