200-901 exam dumps

200-901 practice question 48 of 204

Cisco DevNet Associate. Associate level, Cisco. Free question with the correct answer and a full explanation.

200-901 Question 48

Select 3

A developer is debugging an HTTP API response from a web server and receives the following response:

HTTP/1.1 404 Not Found Content-Type: application/json Content-Length: 57

{"error": "Resource not found", "code": 404}

Which parts of this response correspond to the headers and the body?

  1. A

    HTTP/1.1 404 Not Found is part of the headers.

  2. B

    Content-Type: application/json is part of the headers.

  3. C

    Content-Length: 57 is part of the headers.

  4. D

    {"error": "Resource not found", "code": 404} is part of the body.

  5. E

    HTTP/1.1 404 Not Found is part of the body.

Show answer and explanation

Correct answers: B, C, D

Explanation

An HTTP response consists of three main components: the status line, headers, and body. The status line (e.g., HTTP/1.1 404 Not Found) provides protocol version and response status information. Headers like Content-Type and Content-Length provide metadata about the response. The body contains the actual data being sent, such as the JSON payload in this example.

  • A. Incorrect.

    The HTTP status line (HTTP/1.1 404 Not Found) is not considered part of the headers. It is a separate component of the response message.

  • B. Correct.

    Content-Type: application/json is a header that specifies the media type of the response body.

  • C. Correct.

    Content-Length: 57 is a header that indicates the size of the response body in bytes.

  • D. Correct.

    {"error": "Resource not found", "code": 404} represents the body of the HTTP response, which contains the actual data sent by the server.

  • E. Incorrect.

    HTTP/1.1 404 Not Found is not part of the body. It is the status line, which is distinct from both headers and body.

Timed practice exam

Take a 200-901 practice test under exam conditions

75 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam