ASP.NET MVC5/6 Routing based on Http Header values
问题 Let's say I have a most basic controller public class HomeController : Controller { public ActionResult Index(string id, string language) { return View(); } } Which takes in 2 parameters. However there is one requirement that the client which calls the action method should pass id value from URL but language value from http header. It means the url should be /Home/Index/12345 and meanwhile the calling client will set a Http Header value language : en . How shall I set the routing in MVC5 or