MCPcopy Create free account
hub / github.com/angular-ui/ui-grid / resolvePromise

Function resolvePromise

lib/test/angular/1.5.0/angular.js:11274–11285  ·  view source on GitHub ↗

* Resolves the raw $http promise.

(response, status, headers, statusText)

Source from the content-addressed store, hash-verified

11272 * Resolves the raw $http promise.
11273 */
11274 function resolvePromise(response, status, headers, statusText) {
11275 //status: HTTP response status code, 0, -1 (aborted by timeout / promise)
11276 status = status >= -1 ? status : 0;
11277
11278 (isSuccess(status) ? deferred.resolve : deferred.reject)({
11279 data: response,
11280 status: status,
11281 headers: headersGetter(headers),
11282 config: config,
11283 statusText: statusText
11284 });
11285 }
11286
11287 function resolvePromiseWithResult(result) {
11288 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