HTTP 412 Lab

HTTP 412 Precondition Failed indicates that one or more conditions in the request headers (If-Match, If-Unmodified-Since, If-None-Match) evaluated to false on the server. This is the backbone of optimistic concurrency control in HTTP — the client says 'only update this if it hasn't changed since I last saw it,' and the server returns 412 when it has changed, preventing lost updates.

Try it (live endpoint)

Response includes the status code, standard headers (including Content-Type), and a small diagnostic JSON body describing the request and returned status.

Simulator URL (copy in the app after load — not a normal link):

https://httpstatus.com/api/status/412

Example request:

curl -i "https://httpstatus.com/api/status/412"
Try in playground