I'd like to keep my code compact and concise, so I'd like to emulate the MVC 6 Controller class instead of maintaining a separate Controller and ApiController. This post gets pretty close, but I'd like to remove the JSON assumption and support content negotiation. (Admittedly, I'll most likely use it only for the JSON functionality, but I like being flexible.)
Can anyone provide a simple example of an MVC 5 Controller with a method supporting content negotiation that could be called from AJAX? Optionally, an explanation of the sample would also be appreciated.