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

Function resolvePromise

test/angular/1.3/angular.js:9733–9744  ·  view source on GitHub ↗

* Resolves the raw $http promise.

(response, status, headers, statusText)

Source from the content-addressed store, hash-verified

9731 * Resolves the raw $http promise.
9732 */
9733 function resolvePromise(response, status, headers, statusText) {
9734 //status: HTTP response status code, 0, -1 (aborted by timeout / promise)
9735 status = status >= -1 ? status : 0;
9736
9737 (isSuccess(status) ? deferred.resolve : deferred.reject)({
9738 data: response,
9739 status: status,
9740 headers: headersGetter(headers),
9741 config: config,
9742 statusText: statusText
9743 });
9744 }
9745
9746 function resolvePromiseWithResult(result) {
9747 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