title: Circular dependency while pushing http interceptor
body: <p>I am using http Interceptor to intercept each http request in my application.
  But I am getting <strong>Circular dependency found: $http &lt;- APIInterceptor &lt;- $http &lt;- $templateRequest &lt;- $compile</strong></p>
  
  <p>here is my Service code: </p>
  
  <pre><code>mPosServices.factory('mosServiceFactory', function ($http, $rootScope, $cookies, $q) {
      return{
           refresh_token: function () {
              var refreshToken = $http({
                  method: "get",
                  url: "myservice/oauth/token?grant_type=refresh_token&amp;client_id=restapp&amp;client_secret=restapp&amp;refresh_token=" + $cookies.get('refresh_token'),
              })
              return refreshToken;
          }
  });
  
  mPosServices.service('APIInterceptor', ['mosServiceFactory','$cookies',function (mosServiceFactory,$cookies) {
          var service = this;
          service.request = function (config) {
              if (!$cookies.get('access_token')) { //if access_token cookie does not exist
                 mosServiceFactory.refresh_token().then(function (response) {
                      var date = new Date();
                      date.setTime(date.getTime() + (response.data.expiresIn * 1000));
                      $cookies.remove('access_token');
                      $cookies.put('access_token', response.data.value, {expires: date});
                      $cookies.put('refresh_token', response.data.refreshToken.value);
                  }); //call the refresh_token function first
              }
              return config;
          };
  
          service.responseError = function (response) {
              return response;
          };
      }]);
  </code></pre>
  
  <p>and pushing it as:</p>
  
  <pre><code>$httpProvider.interceptors.push('APIInterceptor');
  </code></pre>
  
  <p>in config function.
  Am I doing something wrong here?
  Even I tried to inject $http manually using </p>
  
  <blockquote>
    <p>$injector</p>
  </blockquote>
  
  <p>, but getting same error.
  Kindly Help me.</p>