I\'m trying to return a status code of 304 not modified for a GET method in a web api controller.
The only way I succeeded was something like this:
p
Another option:
return new NotModified();
public class NotModified : IHttpActionResult { public Task ExecuteAsync(CancellationToken cancellationToken) { var response = new HttpResponseMessage(HttpStatusCode.NotModified); return Task.FromResult(response); } }