nerdexam
Cisco

350-201 · Question #3

What do 2xx HTTP response codes indicate for REST APIs?

The correct answer is D. successful acceptance of the client's request. HTTP 2xx status codes are the standard class indicating that a client request was successfully received, understood, and accepted by the server.

Fundamentals

Question

What do 2xx HTTP response codes indicate for REST APIs?

Options

  • Aadditional action must be taken by the client to complete the request
  • Bthe server takes responsibility for error status codes
  • Ccommunication of transfer protocol-level information
  • Dsuccessful acceptance of the client's request

How the community answered

(38 responses)
  • B
    3% (1)
  • C
    3% (1)
  • D
    95% (36)

Why each option

HTTP 2xx status codes are the standard class indicating that a client request was successfully received, understood, and accepted by the server.

Aadditional action must be taken by the client to complete the request

Additional client action such as following a redirect is indicated by 3xx status codes, not 2xx.

Bthe server takes responsibility for error status codes

Server-side error conditions are communicated through 5xx status codes, which signal that the server failed to fulfill an otherwise valid request.

Ccommunication of transfer protocol-level information

Transfer protocol-level informational responses are conveyed by 1xx status codes, which provide provisional acknowledgments before the final response is sent.

Dsuccessful acceptance of the client's requestCorrect

The 2xx class - including 200 OK, 201 Created, and 204 No Content - signifies that the server successfully processed the client's request. In REST API design, these codes confirm the requested operation completed as expected, which is why they are returned for successful GET, POST, PUT, PATCH, and DELETE operations.

Concept tested: HTTP response status code classes for REST APIs

Source: https://www.rfc-editor.org/rfc/rfc7231#section-6.3

Topics

#HTTP status codes#REST API#2xx responses

Community Discussion

No community discussion yet for this question.

Full 350-201 Practice