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 default content-type overriding provided content-type #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix default content-type overriding provided content-type #19

wants to merge 1 commit into from

Conversation

domjtalbot
Copy link

I found that currently:

  • When the User sets the content-type, it is overridden with application/json.
  • When the User doesn't set the content-type, no content-type is set in the request header resulting in the api returning 400 Bad Request.

This pull request swaps the if condition around so that:

  • When the User sets the content-type, the user set content-type is used in the request header.
  • When the User doesn't set the content-type, application/json is set as the content-type in the request header.

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