Hi Zilabify,
your building an interceptor, so you want to know what other requests are going on during a in process $http request?
Your current solution is to try to inject $http, to the inside of $http. That's a circular reference, and is not going to work.
What is it you are trying to accomplish? I have looked, and didn't find an easy way to get hold of the http object inside a interceptor.
I think you better use an decorator for what you need. (my guess, canceling pending request upon a new one?)
something like:
$provide.decorator('$http', function($delegate) {
// $delegate is the original $http!
console.log($delegate.pendingRequests)
return $delegate
});
Regards
Sander Elias