title: How do I get the HTTP response status code in AngularJS 1.2
body: <p>Using <code>ngResource</code> in AngularJS 1.2rc(x), how do I get the status code now?</p>
  
  <pre><code>RestAPI.save({resource}, {data}, function( response, responseHeaders ) {
  });
  </code></pre>
  
  <p>where <code>RestAPI</code> is my <code>ngResource</code>.</p>
  
  <p>The response has the <code>$promise</code> object and the resource returned from the server but not a status anymore. The <code>responseHeaders()</code> function only has a status if the server injects the status code into the header object, but not the true returned status code. So some servers may serve it and some might not.</p>