* Callback registered to $httpBackend(): * - caches the response if desired * - resolves the raw $http promise * - calls $apply
(status, response, headersString)
| 9157 | * - calls $apply |
| 9158 | */ |
| 9159 | function done(status, response, headersString) { |
| 9160 | if (cache) { |
| 9161 | if (isSuccess(status)) { |
| 9162 | cache.put(url, [status, response, parseHeaders(headersString)]); |
| 9163 | } else { |
| 9164 | // remove promise from the cache |
| 9165 | cache.remove(url); |
| 9166 | } |
| 9167 | } |
| 9168 | |
| 9169 | resolvePromise(response, status, headersString); |
| 9170 | $rootScope.$apply(); |
| 9171 | } |
| 9172 | |
| 9173 | |
| 9174 | /** |
no test coverage detected