title: I need $http POST Status code 400, but getting 200
body: <p>I have this code</p>
  
  <pre><code>var body="ok";
  var suc=0; var failed=0;
  $http({
             url: API.toUrl('api/xxxx/xxxx'),
                  method: 'POST',
                  data: body
              }).then(function(response) {
                  if(response.status==200){
                      suc=suc+1;
                  }
                  if(response.status==400){
                      failed=failed+1;
                  }                        
              });
  </code></pre>
  
  <p>My problem in this is that I can't obtain the 400 Status Code, I am only getting 200 but not 400. How can I get 400 status code in my <code>response</code> parameter.</p>
  
  <p>I am working in Angular, any idea for obtain the 400?</p>
  
  <p>Thanks</p>