title: How to configure .NET Core API to always return JSON
body: <p>I've created a .NET Core API.  If I set the endpoint to return an object, it currently successfully returns it in JSON as desired.  If the return type of the endpoint is <code>void</code>, however, it gives a 200 response, but the response header is <code>text/html</code> instead of <code>application/json</code>.</p>
  
  <p>How can I configure my .NET Core API to always give a response with a JSON header?</p>