* Resolves the raw $http promise.
(response, status, headers, statusText)
| 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); |
no test coverage detected