title: How to format response in an async WebAPI method?
body: <p>If I have an <code>async</code> web API method, then the <code>Request</code> object is null (as id discussed in other posts such as <a href="https://stackoverflow.com/questions/18383923/why-is-httpcontext-current-null-after-await">this one</a>).</p>
  
  <p>It seems that the most common means of returning a response in this circumstance is to use something like</p>
  
  <pre><code>return new HttpResponseMessage(HttpStatusCode.OK) {
     Content = new ObjectContent&lt;T&gt;(myObj, new JsonMediaTypeFormatter())
  };
  </code></pre>
  
  <p>But whatabout the formatting? Normally the <code>Request</code> object handles that because it knows what was requested, but if I don't have a <code>Request</code> object then how do I know the requested format?webapi</p>