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

JSON payload type not recognized until switched #267

Open
djromberg opened this issue May 28, 2024 · 0 comments
Open

JSON payload type not recognized until switched #267

djromberg opened this issue May 28, 2024 · 0 comments

Comments

@djromberg
Copy link

POST requests with JSON payload initially do not work if the request body type hasn't been touched. It defaults to JSON but it needs to be explicitly deselected and selected in order to work. An initial request using the default parameters (POST method and JSON body type) results in "Expected request with Content-Type: application/json" within an example service. When the body type is touched - e.g. changed from JSON to CUSTOM and back to JSON, everything works as expected and the target service is contacted with the correct Content-Type header.

It could be that the behavior of the mentioned example service is not correct, however, the RESTED client should not behave differently when being used for the first time with defaults - in comparison to setting these values explicitly.

This issue is probably related to #186 and #172. It should provide a bit more context and another hint to improve this awesome tool :)

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

No branches or pull requests

1 participant