* Resolves the raw $http promise.
(response, status, headers, statusText)
| 10370 | * Resolves the raw $http promise. |
| 10371 | */ |
| 10372 | function resolvePromise(response, status, headers, statusText) { |
| 10373 | // normalize internal statuses to 0 |
| 10374 | status = Math.max(status, 0); |
| 10375 | |
| 10376 | (isSuccess(status) ? deferred.resolve : deferred.reject)({ |
| 10377 | data: response, |
| 10378 | status: status, |
| 10379 | headers: headersGetter(headers), |
| 10380 | config: config, |
| 10381 | statusText: statusText |
| 10382 | }); |
| 10383 | } |
| 10384 | |
| 10385 | function resolvePromiseWithResult(result) { |
| 10386 | resolvePromise(result.data, result.status, shallowCopy(result.headers()), result.statusText); |
no test coverage detected