Skip to content

Conversation

@fpoppinga
Copy link
Contributor

@fpoppinga fpoppinga commented Mar 13, 2024

This fixes a bug, where the Content-Type header would be reset to the default, when the request.body contains a falsy value.

For example, given using the fetch api, when sending a request with body 0 (i.e. the number zero), the Content-Type header would default to text/plain; utf-8 (which is the browser default), even when application/json would be expected (and would be set if the request body was e.g. 1, i.e. the number one).

@ferdikoomen ferdikoomen merged commit 7ac99d4 into ferdikoomen:master Mar 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants