3

I'm starting to work with the ASP.NET MVC 4 Web API tools and I'd like to version my services using a parameter on the MIME type in the HTTP Accept header in manner similar to what's discussed here: Best practices for API versioning?

I've tried a route constraint, but it feels like I'm going down the wrong road. Has anyone else already solved this problem?

Community
  • 1
  • 1
The Davester
  • 498
  • 3
  • 8

1 Answers1

0

A route constraint is the 'right' road, inasfar as it's a way that works to do it.

If you feel like that's a little too hacky, you can always write your own HTTP module and handle the request higher up.

George Stocker
  • 57,289
  • 29
  • 176
  • 237