Authorised Territory code examples - This .NET Core Web API C# tutorial shows how to create custom response in minimal API and return XML.
We extend IResultExtensions and create new class based on IResult that allows minimal API to return either XML or JSON depending on client's Accept header.
Finally we test with Postman.