2xx Success
2xx status codes indicate success, meaning that the client's request was received, understood, and accepted by the server.
A 200 response indicates that the request has succeeded.
A 200 response is commonly used in the following scenarios:
- GET requests: Returns requested resources such as webpages, images, or API data, along with relevant headers.
- HEAD requests: Retrieves only headers corresponding to the requested resource, such as metadata. For example, file size or last modified date.
- POST requests: Confirms successful processing of submitted data, such as form submissions, often with details about the result in the response body.
A 200 response should ideally include a payload but is not required. Occasionally, an origin server may return a 200 response with zero content length. However, following RFC standards, a 204 response is recommended in such cases (except for the CONNECT method).
By default, 200 responses are cacheable by proxy servers and browsers. If specific cache controls are not defined, static resources with a 200 response are cached for two hours at Cloudflare's edge.
A 201 response indicates the successful creation of one or more new resources. The server typically includes the location of the newly created resource in either the Location
header or the request URI.
Creating a new resource in response to a POST request. For example, creating a new user, article, or record.
Cloudflare forwards 201 responses without modification.
For further information, refer to RFC 7231 ↗ for more details about validator headers, like ETag and Last-Modified in a 201 response.
A 203 response indicates that the request was successful, but the response did not come directly from the origin server. The response was instead delivered by a proxy or intermediate server.
Servers use this response to tell a client that the resource was cached by a proxy server.
Cloudflare does not cache 203 responses. For details about how Cloudflare handles 203 responses, refer to HTTP request headers.
A 204 response indicates that the request was successfully processed, but there is no content to return in the response.
This response is often used by servers to indicate that a document editor's save action to the origin server was completed successfully.
204 responses never contain payloads, as specified by the HTTP standard, and Cloudflare does not cache these responses.
A 205 response tells the client to return to its previous state after a request.
This response occurs after a user submits a form or other data and they want to tell the client to refresh the page or allow a new submission.
205 responses must not contain any payloads and Cloudflare does not cache these responses.
A 206 response means that the request was partially successful, often used for serving large files in smaller chunks.
This response is often used to decrease latency when clients are processing larger files that might require split or interrupted downloads. For instance, for streaming video or serving file ranges for progressive loading.
A 206 response includes either:
- Partial payload that contains a
Content-Range
header specifying the requested range and the data provided in the response. - Multipart payload that omits the
Content-Range
header at the top level but includesContent-Type
andContent-Range
headers for each part of the multipart response body.
For more details, refer to RFC 7233 Section 4.1 ↗.
Cloudflare handles 206 responses for range requests, but caching behavior may vary depending on the file type and origin settings.