Answer the question
In order to leave comments, you need to log in
What is the correct API behavior for an empty request body by default?
Colleagues, tell me how the public API should behave if the requirements indicate that it accepts an empty request body, and a request with data is sent to it.
Interested in options "according to the textbook" and in fact.
Should the API ignore the data, or should it respond with an error?
Answer the question
In order to leave comments, you need to log in
If, according to the specification, the request should be without a body, but the client sends something in the body, then it is worth throwing 400 Bad Request
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question