From time to time you have to implement an API that has to have the same endpoint but has to do something differently based on the content of the request. For example take the OAuth2 /token endpoint. (This is an example, in real world use you would choose something more secure than this legacy oauth…