I send a request with "If-None-Match" header by postman, but it's always null in controller.
I'm using Asp.net core 1.1.
Is there anything wrong with my code?
if (Request.Headers.ContainsKey("If-None-Match"))
{
var oldETag = Request.Headers["If-None-Match"].First();
if (cache.Get($"Tenant-{id}-{oldETag}") != null)
{
return StatusCode((int)HttpStatusCode.NotModified);
}
}
UPDATE 1
I create a new request with both If-Match & If-None-Match header, but only If-Match header exists in controller If-None-Match still null.


