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 126.96.36.199). 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 188.8.131.52), 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 184.108.40.206) 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 220.127.116.11).
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 18.104.22.168) If-Match = "If-Match" ":" ( "*" / 1*entity-tag ) CRLF
Example: If-Match: W/"X'000000000000D2F3'"