Full Stack Web Development

W13 Fast Focus: Adding Content-Negotiation to ASP.NET Core MVC


2:00pm - 2:20pm

Level: Intermediate

Chris Klug


Active Solution

Content-Negotiation allows you to serve different representations of the same resource from your MVC app. This means that you could for example serve up a user's information as HTML, JSON and XML and the users profile picture from the same endpoint. Or have multiple versions of your API endpoint when you are forced to introduce breaking changes. Something that can help out a lot when doing API development.

You will learn:

  • That content-negotiation is a great way to extend our APIs
  • What is needed to support content-negotiation in ASP.NET Core
  • That ASp.NET Core is more than just the built-in features