Skip to content

Conversation

emilecantin
Copy link
Contributor

If requestParams contained headers, the whole headers would be replaced by these ones, wiping out the automatic Content-Type header.

Putting the requestParams spread first fixes it, as the re-definition of headers will overwrite them.

If `requestParams` contained headers, the whole headers would be replaced by these ones, wiping out the automatic `Content-Type` header.

Putting the `requestParams` spread first fixes it, as the re-definition of `headers` will overwrite them.
@js2me
Copy link
Member

js2me commented Feb 18, 2021

Hello @emilecantin !
Thanks for PR with fix this problem!

Copy link
Member

@js2me js2me left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks

@js2me js2me merged commit 2c9417b into acacode:master Feb 18, 2021
@js2me js2me linked an issue Feb 18, 2021 that may be closed by this pull request
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.

ContentType.Json doesn't set the content type header correctly
2 participants