MCPcopy Create free account
hub / github.com/EricSimons/ionic-course / resolvePromise

Function resolvePromise

code/songhop/www/lib/angular/angular.js:9622–9633  ·  view source on GitHub ↗

* Resolves the raw $http promise.

(response, status, headers, statusText)

Source from the content-addressed store, hash-verified

9620 * Resolves the raw $http promise.
9621 */
9622 function resolvePromise(response, status, headers, statusText) {
9623 // normalize internal statuses to 0
9624 status = Math.max(status, 0);
9625
9626 (isSuccess(status) ? deferred.resolve : deferred.reject)({
9627 data: response,
9628 status: status,
9629 headers: headersGetter(headers),
9630 config: config,
9631 statusText: statusText
9632 });
9633 }
9634
9635 function resolvePromiseWithResult(result) {
9636 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