200-901 · Question #153
Which response status code is used by a RESTful interface to indicate successful execution of a request?
The correct answer is A. 200. HTTP status code 200 indicates a successful RESTful request. Other listed codes represent client or server errors, not success.
Question
Which response status code is used by a RESTful interface to indicate successful execution of a request?
Options
- A200
- B404
- C405
- D500
How the community answered
(36 responses)- A86% (31)
- B3% (1)
- C3% (1)
- D8% (3)
Why each option
HTTP status code 200 indicates a successful RESTful request. Other listed codes represent client or server errors, not success.
HTTP 200 OK is the standard success response code defined by the HTTP/1.1 specification for RESTful interfaces. It signals that the server received, understood, and successfully processed the client request. Any 2xx code denotes success, with 200 being the most common general-purpose success response.
404 Not Found is a client-side error indicating the server cannot locate the requested resource, not a success condition.
405 Method Not Allowed is a client-side error indicating the HTTP method used is not supported for the target resource.
500 Internal Server Error is a server-side error indicating the server encountered an unexpected condition that prevented it from fulfilling the request.
Concept tested: HTTP REST API response status codes
Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
Topics
Community Discussion
No community discussion yet for this question.