* Resolves the raw $http promise.
(response, status, headers, statusText, xhrStatus)
| 13417 | * Resolves the raw $http promise. |
| 13418 | */ |
| 13419 | function resolvePromise(response, status, headers, statusText, xhrStatus) { |
| 13420 | //status: HTTP response status code, 0, -1 (aborted by timeout / promise) |
| 13421 | status = status >= -1 ? status : 0; |
| 13422 | |
| 13423 | (isSuccess(status) ? deferred.resolve : deferred.reject)({ |
| 13424 | data: response, |
| 13425 | status: status, |
| 13426 | headers: headersGetter(headers), |
| 13427 | config: config, |
| 13428 | statusText: statusText, |
| 13429 | xhrStatus: xhrStatus |
| 13430 | }); |
| 13431 | } |
| 13432 | |
| 13433 | function resolvePromiseWithResult(result) { |
| 13434 | resolvePromise(result.data, result.status, shallowCopy(result.headers()), result.statusText, result.xhrStatus); |
no test coverage detected