Scenarios To Implement Custom Message Handlers in ASP.NET Web API | ASP.NET Web API Reference Guide | ASP.NET Web API Tutorial

Adding custom handlers are good for cross-cutting concerns that operate at the level of HTTP messages (rather than controller actions). For example, a message handler might:
  • Read or modify request headers.
  • Add a response header to responses.
  • Validate requests before they reach the controller.