What is the difference between using MessageHandler and a filter to check the API key in the request header for the MVI MVI web project.
I see that there is a well-described MessageHandler example for this purpose at http://www.asp.net/web-api/overview/working-with-http/http-message-handlers
eg.
GlobalConfiguration.Configuration.MessageHandlers.Add(new ApiKeyHandler());
But it looks like I can do the same using a filter.
GlobalConfiguration.Configuration.Filters.Add(new ApiKeyFilter());
Assuming that ApiKeyFilter and ApiKeyHandler just look at the request header and check the api key, which method is more efficient? What's the difference?
MonkeyBonkey
source share