MCPcopy Create free account
hub / github.com/cafebazaar/blacksmith / done

Function done

web/static/bower_components/angular/angular.js:10528–10548  ·  view source on GitHub ↗

* Callback registered to $httpBackend(): * - caches the response if desired * - resolves the raw $http promise * - calls $apply

(status, response, headersString, statusText)

Source from the content-addressed store, hash-verified

10526 * - calls $apply
10527 */
10528 function done(status, response, headersString, statusText) {
10529 if (cache) {
10530 if (isSuccess(status)) {
10531 cache.put(url, [status, response, parseHeaders(headersString), statusText]);
10532 } else {
10533 // remove promise from the cache
10534 cache.remove(url);
10535 }
10536 }
10537
10538 function resolveHttpPromise() {
10539 resolvePromise(response, status, headersString, statusText);
10540 }
10541
10542 if (useApplyAsync) {
10543 $rootScope.$applyAsync(resolveHttpPromise);
10544 } else {
10545 resolveHttpPromise();
10546 if (!$rootScope.$$phase) $rootScope.$apply();
10547 }
10548 }
10549
10550
10551 /**

Callers 2

jsonpReqFunction · 0.70
Gruntfile.jsFile · 0.50

Calls 3

isSuccessFunction · 0.85
parseHeadersFunction · 0.85
resolveHttpPromiseFunction · 0.85

Tested by

no test coverage detected