httpstatuses/contents/codes/200.md
WALL-E 62df9e637c Add Python status constants (#57)
* Add Python status constants

* Add Python 2, Python 3+, Python 3.5+ status constants
2016-05-22 00:07:16 +01:00

1.7 KiB

set code title references
2 200 OK
Rails HTTP Status Symbol Go HTTP Status Constant Symfony HTTP Status Constant Python2 HTTP Status Constant Python3+ HTTP Status Constant Python3.5+ HTTP Status Constant
:ok http.StatusOK Response::HTTP_OK httplib.OK http.client.OK http.HTTPStatus.OK

The request has succeeded.

The payload sent in a 200 response depends on the request method. For the methods defined by this specification, the intended meaning of the payload can be summarized as:

  • GET a representation of the target resource
  • HEAD the same representation as GET, but without the representation data
  • POST a representation of the status of, or results obtained from, the action;
    • PUT DELETE a representation of the status of the action;
    • OPTIONS a representation of the communications options;
    • TRACE a representation of the request message as received by the end server.

Aside from responses to CONNECT, a 200 response always has a payload, though an origin server MAY generate a payload body of zero length. If no payload is desired, an origin server ought to send 204 No Content instead. For CONNECT, no payload is allowed because the successful result is a tunnel, which begins immediately after the 200 response header section.

A 200 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls1.