MCPcopy Create free account
hub / github.com/JacksonTian/fks / completeRequest

Function completeRequest

fks_chart/bower_components/angular/angular.js:8648–8666  ·  view source on GitHub ↗
(callback, status, response, headersString, statusText)

Source from the content-addressed store, hash-verified

8646 }
8647
8648 function completeRequest(callback, status, response, headersString, statusText) {
8649 // cancel timeout and subsequent timeout promise resolution
8650 timeoutId && $browserDefer.cancel(timeoutId);
8651 jsonpDone = xhr = null;
8652
8653 // fix status code when it is 0 (0 status is undocumented).
8654 // Occurs when accessing file resources or on Android 4.1 stock browser
8655 // while retrieving files from application cache.
8656 if (status === 0) {
8657 status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0;
8658 }
8659
8660 // normalize IE bug (http://bugs.jquery.com/ticket/1450)
8661 status = status === 1223 ? 204 : status;
8662 statusText = statusText || '';
8663
8664 callback(status, response, headersString, statusText);
8665 $browser.$$completeOutstandingRequest(noop);
8666 }
8667 };
8668
8669 function jsonpReq(url, callbackId, done) {

Callers 1

createHttpBackendFunction · 0.85

Calls 2

urlResolveFunction · 0.85
callbackFunction · 0.85

Tested by

no test coverage detected