CCNA: Cisco Certified Network Associate — Question 1359
With REST API, which standard HTTP header tells a server which media type is expected by the client?
Answer options
- A. Accept-Encoding: gzip. deflate
- B. Accept-Patch: text/example; charset=utf-8
- C. Content-Type: application/json; charset=utf-8
- D. Accept: application/json
Correct answer: D
Explanation
The correct answer is D, as the 'Accept' header specifies the media types that are acceptable for the response. Option A refers to the encoding used for the response, B specifies a patch media type, and C indicates the media type of the request body, which does not inform the server about the client's expected response type.