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

Function resolvePromise

test/angular/1.6/angular.js:12783–12795  ·  view source on GitHub ↗

* Resolves the raw $http promise.

(response, status, headers, statusText, xhrStatus)

Source from the content-addressed store, hash-verified

12781 * Resolves the raw $http promise.
12782 */
12783 function resolvePromise(response, status, headers, statusText, xhrStatus) {
12784 //status: HTTP response status code, 0, -1 (aborted by timeout / promise)
12785 status = status >= -1 ? status : 0;
12786
12787 (isSuccess(status) ? deferred.resolve : deferred.reject)({
12788 data: response,
12789 status: status,
12790 headers: headersGetter(headers),
12791 config: config,
12792 statusText: statusText,
12793 xhrStatus: xhrStatus
12794 });
12795 }
12796
12797 function resolvePromiseWithResult(result) {
12798 resolvePromise(result.data, result.status, shallowCopy(result.headers()), result.statusText, result.xhrStatus);

Callers 8

sendReqFunction · 0.70
resolveHttpPromiseFunction · 0.70
resolvePromiseWithResultFunction · 0.70
DeferredFunction · 0.70
processQueueFunction · 0.70
whenFunction · 0.70
allFunction · 0.70
resolveFnFunction · 0.70

Calls 4

isSuccessFunction · 0.70
headersGetterFunction · 0.70
$$rejectFunction · 0.70
$$resolveFunction · 0.70

Tested by

no test coverage detected