API Testing · Junior · Question 20 of 75
What does the Accept header do?
- 1Confirms that the client accepted the terms of use
- 2Tells the server to accept the request without checks
- 3Tells the server which response formats the client accepts
Show the answer
Correct answer: Tells the server which response formats the client accepts
Explanation
With Accept: application/json the server should return JSON or 406 Not Acceptable. This is part of content negotiation.