API Design · Junior · Question 20 of 75
What is the Accept header for?
- 1The server says whether it accepted the request
- 2It carries the API key
- ✓Correct answer: The client says which response media types it can handle, e.g.
application/json
Explanation
This is content negotiation. If the server can't produce any acceptable format, it can answer 406 Not Acceptable.