title: Error while trying to use angularjs interceptors Uncaught getting Cannot call method 'push' of undefined
body: <p>I am using Angularjs 1.2.0rc1. The all day i have been trying to get angular interceptors to work. I have narrowed down the problem to be that $httpProvider.interceptors.push seem to be undefined, I have no clue why, Everything else is working fine.</p>
  
  <p>The following is sample code:</p>
  
  <pre><code>services.factory('testInterceptor', function ($q) {
  return {    
    'response': function(response) {
      console.log(response);
      return response || $q.when(response);
    },     
    'responseError': function(rejection) {
      console.log(rejection);
      return $q.reject(rejection);
    }
  };
  });
  </code></pre>
  
  <p>in the <code>module.config</code> I have the following code.</p>
  
  <pre><code>$httpProvider.interceptors.push('testInterceptor');
  </code></pre>
  
  <p>if I delete the above code, the application works fine, however if its present , i keep on getting this error on my console</p>
  
  <blockquote>
    <p>"Uncaught TypeError: Cannot call method 'push' of undefined from
    myModule."</p>
  </blockquote>
  
  <p><code>myModule</code> is the name of the module.</p>
  
  <p><strong>Please do note that, from my investigation "$httpProvider.interceptors" seems to be undefined, i have no clue as to why it is, any insight would be helpful.</strong></p>
  
  <p>I appreciate any assistance/hints your might have.</p>