2.2.5.5 If-Match
The If-Match request-header field is used with a method to make it conditional. As specified in [RFC2616], "the purpose of this feature is to allow efficient updates of cached information with a minimum amount of transaction overhead. It is also used, on updating requests, to prevent inadvertent modification of the wrong version of a resource".
The If-Match header is used in this document as specified in [RFC2616]. However, this document adds additional constraints to the types of requests for which the header can be provided. Additional constraints are also added to the syntax of the header value.
This header MAY<53> only be present on HTTP GET, MERGE, PATCH, or PUT requests to request URIs which identify the same Entity Data Model (EDM) constructs as URI 2, URI 3, URI 4, URI 5, and URI 17 that are defined in Resource Path: Semantics (section 2.2.3.5). Additionally, this header MAY<54> be present on DELETE requests to request URIs that identify the same EDM constructs as URI 2, as specified in Resource Path: Semantics (section 2.2.3.5), and any data service URI whose last path segment is "/$value".
Additionally, this header MAY be present on POST requests to invoke an action (section 2.2.1.3) bound to an entity. This allows clients to prevent an action from having inadvertent side effects based on the wrong version of a resource.
This header MUST NOT be on any POST request other than a request to invoke an action (section 2.2.1.3).
Client processing rules for this header are defined in Request Types (section 2.2.7) and server processing rules are in Message Processing Events and Sequencing Rules (section 3.2.5).
The syntax of the If-Match header is defined as follows:
-
; entity-tag is as per the definition in (section 2.2.5.4) If-Match = "If-Match" ":" ( "*" / 1*entity-tag ) CRLF
Example: If-Match: W/"X'000000000000D2F3'"