title: Intercept a basic http request
body: <p>I created a interceptor to cancel a request with url <code>/foo</code></p>
  <pre><code>angular.module('moduleApp.config', []).config(function ($httpProvider) {
      $httpProvider.interceptors.push('requestInterceptor');
  }).factory('requestInterceptor', function ($q) {
      return {
          'request': function (config) {
              if(config.url == '/foo') {
                  return $q.reject(config);
              }
              return config || $q.when(config);
          }
      }
  });
  </code></pre>
  <p>But I'm getting a weird error in the console...</p>
  <blockquote>
  <p>Broken interceptor detected: Config object not supplied in rejection:
  <a href="https://github.com/chieffancypants/angular-loading-bar/pull/50" rel="nofollow noreferrer">https://github.com/chieffancypants/angular-loading-bar/pull/50</a></p>
  </blockquote>
  <p>I am passing the <code>config</code> in the rejection. What am I missing here??</p>