* Resolves the raw $http promise.
(response, status, headers, statusText, xhrStatus)
| 12783 | * Resolves the raw $http promise. |
| 12784 | */ |
| 12785 | function resolvePromise(response, status, headers, statusText, xhrStatus) { |
| 12786 | //status: HTTP response status code, 0, -1 (aborted by timeout / promise) |
| 12787 | status = status >= -1 ? status : 0; |
| 12788 | |
| 12789 | (isSuccess(status) ? deferred.resolve : deferred.reject)({ |
| 12790 | data: response, |
| 12791 | status: status, |
| 12792 | headers: headersGetter(headers), |
| 12793 | config: config, |
| 12794 | statusText: statusText, |
| 12795 | xhrStatus: xhrStatus |
| 12796 | }); |
| 12797 | } |
| 12798 | |
| 12799 | function resolvePromiseWithResult(result) { |
| 12800 | resolvePromise(result.data, result.status, shallowCopy(result.headers()), result.statusText, result.xhrStatus); |
no test coverage detected