HttpRequestMessageExtensions.IsIfNoneMatch Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Checks if the request is conditional having a If-None-Match HTTP header field with a value that matches the
current value. In the case of true this can be used to indicate that a
304 (Not Modified) or a 412 (Precondition Failed) status code should be used.
public static bool IsIfNoneMatch(this System.Net.Http.HttpRequestMessage request, System.Net.Http.Headers.EntityTagHeaderValue current);
static member IsIfNoneMatch : System.Net.Http.HttpRequestMessage * System.Net.Http.Headers.EntityTagHeaderValue -> bool
<Extension()>
Public Function IsIfNoneMatch (request As HttpRequestMessage, current As EntityTagHeaderValue) As Boolean
Parameters
- request
- System.Net.Http.HttpRequestMessage
The request to match.
- current
- System.Net.Http.Headers.EntityTagHeaderValue
The current etag for the resource. If there is no current etag (i.e. the resource does not yet
exist) then use null.
Returns
Returns true if one of the If-None-Match values match the current etag; or the
If-None-Match value is "*" and current is not null; otherwise false.