nerdexam
CiscoCisco

200-901 · Question #64

200-901 Question #64: Real Exam Question with Answer & Explanation

The question tests understanding of HTTP request and response structure by requiring the identification and categorization of different parts of a curl command output, including headers, payloads, and the main request/response lines.

Understanding and Using APIs

Question

Drag and Drop Question Refer to the exhibit. Drag and drop the descriptors from the left onto the correct parts of the API request and response on the right. Answer:

Explanation

The question tests understanding of HTTP request and response structure by requiring the identification and categorization of different parts of a curl command output, including headers, payloads, and the main request/response lines.

Approach. The correct interaction involves dragging each descriptor from the left to its corresponding labeled section on the right, based on standard HTTP protocol structure and curl command usage:

  • Request Headers maps to A: Section A shows curl -H 'Content-Type: application/json' -H 'Authorization: Bearer ...', which are the HTTP headers being sent with the request.
  • Request Payload maps to B: Section B shows -d '{"roomId":"...", "text": "test2" }', which is the data (payload) forming the body of the HTTP POST request.
  • HTTP Request maps to C: Section C shows -X POST https://api.ciscopark.com/v1/messages. This line defines the HTTP method (POST) and the URI, which are fundamental components of the HTTP request line and initiate the request.
  • HTTP Response maps to D: Section D shows HTTP/1.1 200 OK. This is the HTTP status line, which is the very first line of an HTTP response, indicating the protocol version, status code, and reason phrase.
  • Response Headers maps to E: Section E lists lines like Via: 1.1 linkerd, Content-Type: application/json, etc., which are metadata key-value pairs in the HTTP response.
  • Response Payload maps to F: Section F displays the JSON object {"id": "YcpJf3aVovyEbCbn7lsDesNkKcgnN5t1Exdc6dCnPt14Va05NfCh9MGJ7j0tWXQLioPJUu73uu7..."}, which is the body of the HTTP response.

Common mistakes.

  • common_mistake. A common mistake is confusing the 'HTTP Request' and 'HTTP Response' descriptors with the headers or payloads. For instance, incorrectly assigning 'HTTP Request' to section A (Request Headers) or B (Request Payload) would be wrong because C specifically represents the core request line (method + URI), which initiates the request. Similarly, assigning 'HTTP Response' to E (Response Headers) or F (Response Payload) would be incorrect, as D is the initial status line marking the beginning of the response. Another mistake could be mixing up request components with response components, e.g., mapping 'Request Headers' to E or 'Response Payload' to B, demonstrating a lack of understanding of the distinct roles of client-server communication elements.

Concept tested. The core concept tested is the structure and components of HTTP requests and responses, including the request line, status line, headers, and body/payload, within the context of API communication using tools like curl.

Topics

#API request#API response#HTTP methods#HTTP status codes

Community Discussion

No community discussion yet for this question.

Full 200-901 PracticeBrowse All 200-901 Questions