How can I route based on the value of the HTTP Accept header?

I am starting to work with ASP.NET MVC 4 web API tools and I would like to update my services using the parameter in the MIME type in the Accept HTTP header as described here: Recommendations on version control of the API?

I tried the route restriction, but it seems to me that I am going on the wrong road. Has anyone else solved this problem?

+3
source share
1 answer

Route restriction is the "right" road, unlike how it works.

If you feel that this is too hacky, you can always write your own HTTP module and process the request above.

0

All Articles