Send ETag headers in ASP.NET Core

added by Paul Wheeler
10/17/2017 12:52:11 PM

1 Kicks, 245 Views

The approach I have taken is to use an IAsyncResultFilter to generate the ETag and Last-Modified response headers. Resources returned by an API typically implement an IConcurrentResource interface that defines ConcurrencyToken and LastModifedOn properties. The result filter determines if the result is a IConcurrentResource; and if true uses the interface properties to set the headers.


0 comments