2015-11-06 21:39:33 +01:00
---
set: 2
code: 200
title: OK
2015-11-07 02:41:41 +01:00
references:
2015-11-09 01:28:54 +01:00
"Rails HTTP Status Symbol": ":ok"
2016-01-27 23:08:33 +01:00
"Go HTTP Status Constant": "http.StatusOK"
2016-04-19 15:19:17 +02:00
"Symfony HTTP Status Constant": "Response::HTTP_OK"
2015-11-06 21:39:33 +01:00
---
2015-11-09 01:28:54 +01:00
The request has succeeded.
2015-11-07 06:31:20 +01:00
2016-04-23 02:12:07 +02:00
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:
2015-11-07 02:41:41 +01:00
2015-11-09 01:28:54 +01:00
* `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.
2015-11-07 02:41:41 +01:00
2016-04-23 02:12:07 +02:00
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 ](/204 ) instead. For CONNECT, no payload is allowed because the successful result is a tunnel, which begins immediately after the 200 response header section.
2015-11-07 02:41:41 +01:00
2016-04-23 02:12:07 +02:00
A 200 response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls< sup > [1](#ref-1)< / sup > .
2015-11-09 01:28:54 +01:00
---
2015-11-07 02:41:41 +01:00
2015-11-09 01:28:54 +01:00
* < span id = "ref-1" >< sup > 1</ sup > Calculating Heuristic Freshness
2015-11-09 19:23:21 +01:00
[RFC7234 Section 4.2.2][2]< / span >
2015-11-09 01:28:54 +01:00
* Source: [RFC7231 Section 6.3.1][1]
2015-11-07 02:41:41 +01:00
2015-11-07 04:03:35 +01:00
[1]: < http: / / tools . ietf . org / html / rfc7231 # section-6 . 3 . 1 >
2016-01-27 23:08:33 +01:00
[2]: < http: / / tools . ietf . org / html / rfc7234 # section-4 . 2 . 2 >