API Testing · Junior · Question 19 of 75
What does the Content-Type request header tell the server?
- 1The type of device the client is running on
- 2The format of the body sent, e.g.
application/json - 3The format the client wants in the response
Show the answer
Correct answer: The format of the body sent, e.g. application/json
Explanation
Content-Type describes the body. Accept says what the client wants back. Mixing them up is a common source of 415 and 406 errors.