httpstatuses/contents/codes/428.md
Samuel Ryan d8a693bf27 Remove markdown line limit (#52)
* Removes line length limit from Status Code Markdown

This will make the data easier to use when we develop the API, it needs
to be consistent, arbitrary new lines (especially in text format) will
be a major issue, so some sort of workaround would have to be
implemented, easier to simply fix the source files.

* Removes line length limit from misc. Markdown files
2016-04-23 01:12:07 +01:00

1.1 KiB

set code title references
4 428 Precondition Required
Symfony HTTP Status Constant
Response::HTTP_PRECONDITION_REQUIRED

The origin server requires the request to be conditional.

Its typical use is to avoid the "lost update" problem, where a client GETs a resource's state, modifies it, and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict. By requiring requests to be conditional, the server can assure that clients are working with the correct copies.

Responses using this status code SHOULD explain how to resubmit the request successfully. For example:

HTTP/1.1 428 Precondition Required
Content-Type: text/html

<html>
  <head>
    <title>Precondition Required</title>
  </head>
  <body>
    <h1>Precondition Required</h1>
    <p>This request is required to be conditional; try using "If-Match".</p>
  </body>
</html>

Responses with the 428 status code MUST NOT be stored by a cache.