Content negotiation (JSON, XML)?
ASP.NET Core selects the response format based on the Accept header.
- JSON is the default.
- To add XML:
services.AddControllers()
.AddXmlSerializerFormatters();
Accept: application/xml
ASP.NET Core selects the response format based on the Accept header.
services.AddControllers()
.AddXmlSerializerFormatters();
Accept: application/xml