title: How can I code a Created-201 response using IHttpActionResult
body: <p>How can I code a Created-201 response  using <code>IHttpActionResult</code> ?</p>
  <p><code>IHttpActionResult</code> has only these options</p>
  <ul>
  <li>Ok</li>
  <li>List item</li>
  <li>NotFound</li>
  <li>Exception</li>
  <li>Unauthorized</li>
  <li>BadRequest</li>
  <li>Conflict Redirect</li>
  <li>InvalidModelState</li>
  </ul>
  <p>What I am doing now is this code below, but I would like to use <code>IHttpActionResult</code> and not  <code>HttpResponseMessage</code></p>
  <pre><code>public IHttpActionResult Post(TaskBase model)
  {
      HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created, model);
      response.Headers.Add(&quot;Id&quot;, model.Id.ToString());
      return ResponseMessage(response);
  }
  </code></pre>