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

Function resolvePromise

test/angular/1.5/angular.js:12090–12101  ·  view source on GitHub ↗

* Resolves the raw $http promise.

(response, status, headers, statusText)

Source from the content-addressed store, hash-verified

12088 * Resolves the raw $http promise.
12089 */
12090 function resolvePromise(response, status, headers, statusText) {
12091 //status: HTTP response status code, 0, -1 (aborted by timeout / promise)
12092 status = status >= -1 ? status : 0;
12093
12094 (isSuccess(status) ? deferred.resolve : deferred.reject)({
12095 data: response,
12096 status: status,
12097 headers: headersGetter(headers),
12098 config: config,
12099 statusText: statusText
12100 });
12101 }
12102
12103 function resolvePromiseWithResult(result) {
12104 resolvePromise(result.data, result.status, shallowCopy(result.headers()), result.statusText);

Callers 3

sendReqFunction · 0.70
resolveHttpPromiseFunction · 0.70
resolvePromiseWithResultFunction · 0.70

Calls 2

isSuccessFunction · 0.70
headersGetterFunction · 0.70

Tested by

no test coverage detected