routing

How to route requests based on HTTP headers in ASP.NET Core

Lester Sanchez
It is common for APIs to route requests based on a combination of HTTP verb (GET, POST, etc.) and path. For example, we can have same path /api/items/123 for both retrieving the information about item 123 and deleting item 123, using HTTP verbs GET and DELETE respectively. But what if we have the same verb and path and need to route the requests based on the value of a HTTP header?