MCPcopy Index your code
hub / github.com/angular-ui/ui-router / completeRequest

Function completeRequest

test/angular/1.2/angular.js:8677–8695  ·  view source on GitHub ↗
(callback, status, response, headersString, statusText)

Source from the content-addressed store, hash-verified

8675 }
8676
8677 function completeRequest(callback, status, response, headersString, statusText) {
8678 // cancel timeout and subsequent timeout promise resolution
8679 timeoutId && $browserDefer.cancel(timeoutId);
8680 jsonpDone = xhr = null;
8681
8682 // fix status code when it is 0 (0 status is undocumented).
8683 // Occurs when accessing file resources or on Android 4.1 stock browser
8684 // while retrieving files from application cache.
8685 if (status === 0) {
8686 status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0;
8687 }
8688
8689 // normalize IE bug (http://bugs.jquery.com/ticket/1450)
8690 status = status === 1223 ? 204 : status;
8691 statusText = statusText || '';
8692
8693 callback(status, response, headersString, statusText);
8694 $browser.$$completeOutstandingRequest(noop);
8695 }
8696 };
8697
8698 function jsonpReq(url, callbackId, done) {

Callers 1

createHttpBackendFunction · 0.70

Calls 2

urlResolveFunction · 0.70
callbackFunction · 0.70

Tested by

no test coverage detected