Monthly Archives: September 2018

Running ASP.NET Core content negotiation by hand

When you are building flexible HTTP APIs, supporting a wide array of different clients, it is common to rely on the process of content negotiation, to allow each client to interact with the API in the most convenient way – be it JSON, XML, Protobuf, Messagepack or any other media type on which both the client and the server can agree.

I have blogged about content negotiation (or in short: conneg) a few times in the past (for example here or here, in ASP.NET Core context). Today I’d like to show you how – in ASP.NET Core – to easily run conneg by hand, instead of relying on the built-in MVC conneg mechanisms.

Continue Reading