title: Content negotiation: how to remove JSON as a supported format?
body: <p>I'm implementing a web service in ASP.NET Core 2.1 based on a specification that exclusively supports XML.  Therefore, the content negotiation process must return a XML document or respond with an error.  Unfortunately ASP.NET Core 2.1 supports JSON by default, and by default the content negotiation process always succeeds if a request is made with Accept: application/json.  </p>
  
  <p>Does anyone know if it's possible to configure an ASP.NET Core project so that the content negotiation process throws an error if any media type other than XML is set?</p>