title: Not receiving Web API HttpResponseMessage in ajax?
body: <p>First attempts at Web API and a little confused.</p>
  
  <p>I've set up a basic Delete in Web Api:</p>
  
  <pre><code>public HttpResponseMessage Delete(string id)
  {
      HttpResponseMessage response = new HttpResponseMessage();
      response.ReasonPhrase = "User successfully deleted";
      response.StatusCode = HttpStatusCode.OK;
  
      return response;
  }
  </code></pre>
  
  <p>and calling it via jquery ajax:</p>
  
  <pre><code>deleteUser: function (data) {
      var self = this;
      $.ajax({
          type: "DELETE",
          url: urlPath + data.Id,
          success: function (response) {
              alert("Success: " + response.status + " : " + response.statusText);
          },
          error: function (response) {
              alert("Error: " + response.status + " : " + response.statusText);
          }
      });
  }
  </code></pre>
  
  <p>This works... Chrome developer tools say StatusCode: 200 User successfully deleted.</p>
  
  <p>Unfortunately the alert from ajax success just says "Success : undefined : undefined", and when breaking inside the success function in Chrome, the response var is blank</p>
  
  <p>How do I retrieve the Status Code/Message in the ajax call to display onscreen?</p>
  
  <p>Thanks</p>