ETagList
is the field value of an If-Match or If-None-Match header
(RFC 9110 §13.1.1, §13.1.2): Any for the * that names whatever
representation the resource currently has, and Tags for a list of
entity-tags.
delete
(Fn [ETagList] ())
deletes a ETagList. This should usually not be called manually.
parse
(Fn [(Ref String a)] (Result ETagList String))
(parse s)
parses an If-Match or If-None-Match field value as
(Result ETagList String).
A field value of * yields Any; any other is read as a list of entity-tags,
in header order. Whitespace around the commas is ignored, as are empty list
elements (RFC 9110 §5.6.1.2); a comma inside an opaque-tag is not a delimiter.
A member that is not a well-formed entity-tag fails, and so does an empty
list, which neither header's grammar has room for.
strong-match?
(Fn [(Ref ETagList a), (Ref (Maybe ETag) a)] Bool)
(strong-match? l etag)
whether l matches etag, the entity-tag of the
representation the server selected — Nothing when it has none — under the
strong comparison function If-Match calls for (RFC 9110 §13.1.1).
Any matches whenever the resource has a current representation, which
Precondition.evaluate takes to be so whenever it
is called.
weak-match?
(Fn [(Ref ETagList a), (Ref (Maybe ETag) a)] Bool)
(weak-match? l etag)
whether l matches etag under the weak comparison
function If-None-Match calls for (RFC 9110 §13.1.2). See
strong-match? for how Any is read.