A network monitoring application sends an HTTP GET request to a Cisco DNA Center REST API endpoint to retrieve device health metrics. The request header includes `Accept: application/json`. Which outcome occurs as a result of including this request header?
- The API controller returns the requested health metrics formatted as a JSON payload in the HTTP response.Answer
- BThe API controller executes an HTTP POST operation to generate a new JSON data file on the network device.
- CThe API controller requires the client to supply an encrypted JSON body within the HTTP GET request payload.
- DThe API controller modifies existing XML configuration settings on the network controller to match JSON standards.
Answer
The API controller returns the requested health metrics formatted as a JSON payload in the HTTP response.
The `Accept` request header allows a client to specify the media type (such as `application/json`) it expects to receive in response from a REST API server. When the server processes the HTTP GET request, it formats the requested data payload as JSON before returning it to the client.
Step-by-Step Solution
Key Concept
HTTP Headers and Data Formats in REST APIs