428 Precondition Required
This is an educational reference page about HTTP 428 Precondition Required. The page itself is served as 200 OK so it can be indexed as HTTP documentation.
The origin server requires the request to be conditional. Intended to prevent 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.
Specification
Registered in the IANA HTTP Status Code Registry as Precondition Required. Defined in RFC 6585, Section 3.
Header and content rules
What RFC 6585 says about a 428 response, quoted from the RFC. The 4xx class rules also apply.
- SHOULD (server; content): Explain how to resubmit the request successfully. Table row
Responses using this status code SHOULD explain how to resubmit the request successfully. RFC 6585 §3
- MUST NOT (cache; storage): Do not store the response. Table row
Responses with the 428 status code MUST NOT be stored by a cache. RFC 6585 §3
The same rules are in the response obligations table and its JSON.