Returning XML from minimal APIs in .NET 6

added by DotNetKicks
7/5/2022 10:39:32 AM

223 Views

In this post I show how you can return an XML response from a minimal API instead of the typical JSON response. I also look at ways to reduce the overhead introduced by MemoryStream in the implementation. One of the headline features of .NET 6 was the addition of minimal APIs.


0 comments