title: Web API 2 returning text/plain responses
body: <p>Really struggling with something I hope people here can help with.  I'm writing a RESTful API in Web API 2.  Whenever I send a request to this service, the response is consistently being sent with a <code>Content-Type</code> of <code>text/plain</code>.  Obviously this is no good, my response needs to be <code>Content-Type</code> of <code>application/json</code>.  I've tried a few suggestions that I found from Google but I don't think I'm understanding the whole picture.</p>
  
  <p>Is there something special I need to do in order to have my web service respond with <code>application/json</code> content?  Note that I want this to work globally across the whole app, so I'm not after a way to modify a given response and set its content type - I want this to be a default behaviour for the whole web service:  If a request contains an <code>Accept</code> header for <code>application/json</code> I want my web service to return that <code>Content-Type</code> instead of <code>text/plain</code>.</p>
  
  <p><strong>Edit to clarify:</strong></p>
  
  <p>My response contains an object called "responseData" that should be serialized into JSON and included in the body.  I'm currently putting together my response like this:</p>
  
  <pre><code>HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, responseData);
  return response;
  </code></pre>
  
  <p><code>responseData</code> is a POCO.  This get's correctly serialized as JSON and returned in the response - the only missing part is the Content-Type which is incorrectly set to "text/plain".  I could manually change this on every single response I compose, but I'm wanting to configure this on a global level.</p>