import { HttpBackend } from './backend'; import { HttpFetchBackend } from './fetch'; import { HttpInterceptor, HttpInterceptorFn } from './interceptor'; import { HttpXhrBackend } from './xhr'; export declare enum HttpFeatureKind { Backend = 0, Interceptors = 1, LegacyInterceptors = 2, XsrfProtection = 3 } export type HttpFeature = { kind: HttpFeatureKind.Backend; value: HttpBackend; } | { kind: HttpFeatureKind.Interceptors; value: HttpInterceptorFn[]; } | { kind: HttpFeatureKind.LegacyInterceptors; value: HttpInterceptor[]; } | { kind: HttpFeatureKind.XsrfProtection; value: HttpInterceptorFn; }; export declare function withXhr(factory?: () => XMLHttpRequest): { readonly kind: HttpFeatureKind.Backend; readonly value: HttpXhrBackend; }; export declare function withFetch(fetchImpl?: typeof fetch): { readonly kind: HttpFeatureKind.Backend; readonly value: HttpFetchBackend; }; export declare function withInterceptors(interceptorFns: HttpInterceptorFn[]): { readonly kind: HttpFeatureKind.Interceptors; readonly value: HttpInterceptorFn[]; }; export declare function withLegacyInterceptors(interceptors: HttpInterceptor[]): { readonly kind: HttpFeatureKind.LegacyInterceptors; readonly value: HttpInterceptor[]; }; export declare function withXsrfProtection(options?: { cookieName?: string; headerName?: string; tokenExtractor?: () => string | null; }): { readonly kind: HttpFeatureKind.XsrfProtection; readonly value: HttpInterceptorFn; };