title: determine request time out in angular $http
body: <p>I am sending an http request using angular as below.</p>
  
  <pre><code>$http({
      url: url,
      params: params,
      method:'POST',
      headers: {
          'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
      },
      timeout: 60000    //60 seconds
  }).success(function(data, status, headers, config) {
      //do something 
  }).error(function(data, status, header, config) {
      if(timedout){  //determine occurrence of timeout.
          //invoke timeout handler
      } else  
          //handle other error
      }
  });
  </code></pre>
  
  <p>How can I determine the timeout?</p>
  
  <p>I have observed that status code "0" is received in this case. Is it safe to check status==0 for timeout?</p>
  
  <p>Please note that I am not asking about HTTP Request timeout (status code 408).</p>