Optimistic Concurrency Control
The If-Unmodified-Since
header is used in all PUT
methods to implement Optimistic Concurrency Control. You must specify the date and time of the version of the resource that you wish to modify. This will be checked on the server and, if the resource has been updated subsequently, the update will be refused with a 412 Precondition Failed.
See RFC7232.
Note: While the above reference gives examples of using HTTP-Date format for the date in the header, the date-time ISO 8601 format should be used in our case (YYYY-MM-DDTHH:MM:SS), e.g.: "If-Unmodified-Since": "2022-02-07T16:18:33"
Updated 1 day ago