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
If you need to return an IHttpActionResult and want to return the error code plus a message, use:
return ResponseMessage(Request.CreateErrorResponse(HttpStatusCode.NotModified, "Error message here"));