Skip to content

Conversation

@Convly
Copy link
Member

@Convly Convly commented Jan 28, 2025

What does it do?

Make sure the setDefaultHeaders HTTP interceptor doesn't override manually set headers.

Why is it needed?

see #27

How to test it?

Using sdk.fetch with a custom content type header should not override said header with application/json

Alternatively, running the unit tests ensures the behavior is correct based on tests/unit/sdk.test.ts and tests/unit/sdk.test.ts

Related issue(s)/PR(s)

fix #27

@Convly Convly added the pr: fix Bug fix label Jan 28, 2025
@Convly Convly added the source: client-interceptors Source is related to HTTP interceptors label Jan 28, 2025
@Convly Convly requested a review from innerdvations January 28, 2025 10:36
Copy link
Contributor

@innerdvations innerdvations left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@innerdvations
Copy link
Contributor

Tested, works for me!

@Convly Convly merged commit 2d356de into main Jan 30, 2025
7 checks passed
@Convly Convly deleted the fix/incorrect-headers-override branch January 30, 2025 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr: fix Bug fix source: client-interceptors Source is related to HTTP interceptors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug]: custom content-type header is overridden

3 participants