It would give an "Unsupported media type" error when making POST request with empty body #1864
MetinTAPAN58
started this conversation in
Show and tell
Replies: 2 comments 1 reply
-
I think its best for the downstream service to handle with its default / configured behavior. Ocelot will be better as just a pipeline with less interfering logic |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi Metin! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Expected Behavior / New Feature
If the request body is null in a POST request the process of must continue
Actual Behavior / Motivation for New Feature
If the request body is null in a POST request or "Content-Length: 0" is given as the Header parameter, it would give an "Unsupported media type" error when making the request over the ApiGateway.
Specifications
To fixed it my solution:
Ocelot/Request/Mapper/
Changes will be required to the MapContent method in RequestMapper.cs.
I edited the code to avoid error in POST requests if request body is empty
Beta Was this translation helpful? Give feedback.
All reactions