How do I log all requests that go through $httpBackend
? I know how to give a mock response with .respond()
, how to let the request pass through with .passThrough()
, but how can I only intercept the request to log it and then let it pass through?
Asked
Active
Viewed 497 times
2

stackular
- 1,431
- 1
- 19
- 41
-
Minor addendum, in case it is relevant: I'm using `protractor` and it hangs waiting for the page to load and I want to see which requests are not fulfilled (mocked/stubbed). – stackular Jun 11 '14 at 16:02
-
Not sure if it helps, but provided you're calling `$httpBackend.flush()` all your unexpected requests should get logged to the console by the karma runner. – Stephen James Sep 05 '14 at 14:55