ng-http-interceptor
Version:
> Http Interceptor library for Angular
22 lines • 787 B
JavaScript
/**
* @fileoverview added by tsickle
* @suppress {checkTypes} checked by tsc
*/
import { getHttpOptionsIdx } from "./getHttpOptionsIdx";
import { getHttpOptions } from "./getHttpOptions";
/**
* \@description
* Gets {\@link RequestOptions} and it's index location in data array.
* If no options found and `alwaysOriginal = false` - creates new {\@link RequestOptions}.
* @param {?} data - Array of http data
* @param {?} method - Http method
* @param {?=} alwaysOriginal - `false` by default
* @return {?}
*/
export function getHttpOptionsAndIdx(data, method, alwaysOriginal = false) {
return {
options: /** @type {?} */ (getHttpOptions(data, method, alwaysOriginal)),
idx: getHttpOptionsIdx(method)
};
}
//# sourceMappingURL=getHttpOptionsAndIdx.js.map