Re: [Specifications] Question about resource versioning (#190)

HTTP has rich support for conditional requests and optimistic concurrency control through `If-*` headers. For the use-case you describe, @inf3rno, I'd say [`If-Match: <ETag>`](https://tools.ietf.org/html/rfc7232#section-3.1) combined with [`412 Precondition Failed`](https://tools.ietf.org/html/rfc7232#section-4.2) and [`428 Precondition Required`](https://tools.ietf.org/html/rfc6585#section-3) is a good fit.

1. For requests missing the `If-Match` header, respond with `428 Precondition Required`. This ensures that all requests must be conditional.
2. For requests that have an `If-Match` header with an `ETag` value different from the current state on the server, respond with `412 Precondition Failed`.
3. For requests with an `If-Match` header with an `ETag` matching the current state on the server, respond with `200 OK` (or whatever fits your use-case).

-- 
GitHub Notification of comment by asbjornu
Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/190#issuecomment-736529690 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 1 December 2020 12:46:03 UTC