title: Web API Best Approach for returning HttpResponseMessage
body: <p>I have a Web API project and right my methods always returns <strong>HttpResponseMessage</strong>.</p>
  
  <p>So, if it works or fails I return:</p>
  
  <p><strong>No errors:</strong></p>
  
  <pre><code>return Request.CreateResponse(HttpStatusCode.OK,"File was processed.");
  </code></pre>
  
  <p><strong>Any error or fail</strong></p>
  
  <pre><code>return Request.CreateResponse(HttpStatusCode.NoContent, "The file has no content or rows to process.");
  </code></pre>
  
  <p>When I return an object then I use:</p>
  
  <pre><code>return Request.CreateResponse(HttpStatusCode.OK, user);
  </code></pre>
  
  <p>I would like to know how can I return to my HTML5 client a better encapsulated respose, so I can return more information about the transaction, etc.</p>
  
  <p>I was thinking on creating a custom class that can encapsulate the HttpResponseMessage but also have more data.</p>
  
  <p>Does anyone have implemented something similar?</p>