API Testing · Junior · Question 19 of 75

What does the Content-Type request header tell the server?

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.

Further reading

Problem with a question

API Testing · Junior · question 19

Test yourself

Take the API Testing · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz