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(fetch/axios): correctly merge headers from opts #231

Merged
merged 16 commits into from
Aug 17, 2024
Merged

Conversation

mnahkies
Copy link
Owner

@mnahkies mnahkies commented Aug 11, 2024

  • Previously if you passed any request headers using the opts parameter, this would overwrite the headers set from parameters, defaults, etc
  • Now these will be consistently merged following: defaults -> params -> opts
    • undefined header values will be ignored, null header values will delete headers set previously

This wound up being a lot more complex than I'd expected, and there may still be some edges that I've missed. However I'm confident that this makes things better than before based on the new e2e tests at least.

@mnahkies mnahkies marked this pull request as ready for review August 11, 2024 13:30
@mnahkies mnahkies enabled auto-merge (squash) August 17, 2024 15:52
@mnahkies mnahkies merged commit 5efc36e into main Aug 17, 2024
2 checks passed
@mnahkies mnahkies deleted the mn/fix/headers branch August 17, 2024 15:54
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.

1 participant