1. HTTP (Hypertext Transfer Protocol)

  1. HTTP Status Codes

  1. 428 Precondition Required
    1. Writing responses (origin servers)
    2. Reading responses (user agents)
    3. Overview table
    4. Example

428 Precondition Required

The 428 Precondition Required HTTP status code indicates request was not filled, and must be re-issued with a conditional request header.

Writing responses (origin servers)

Serers may respond with 428 Precondition Required at the time conditional headers would normally be tested, and if the server is processing an unsafe request, and expects conditional headers for the purpose of avoiding a "lost update" situation.

Servers using this feature should send this status code whether or not the resource exists; if the resource does not exist and no If-None-Match: * is sent, return this status code; and if the resource does exist and no If-Match header was sent, return this status code.

Reading responses (user agents)

The client must re-make the request with a conditional header. This typically requires developer intervention to implement, the request process must be changed to request a resource ETag, and then use it as necessary. If the request is to create a resource, the client can add If-None-Match: *.

Overview table

Name
428
Message
428 Precondition Required
Description
The request is missing conditional request headers
Specification
RFC 6585: Additional HTTP Status Codes ยง3. 428 Precondition Required

Example

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

This request must be made with a conditional request header
(If-Match, If-None-Match, If-Unmodified-Since, If-Modified-Since).