UNPKG

850 BTypeScriptView Raw
1import { HttpOperationResponse } from "../httpOperationResponse";
2import { WebResourceLike } from "../webResource";
3import { BaseRequestPolicy, RequestPolicy, RequestPolicyFactory, RequestPolicyOptionsLike } from "./requestPolicy";
4/**
5 * Options for how redirect responses are handled.
6 */
7export interface RedirectOptions {
8 handleRedirects: boolean;
9 maxRetries?: number;
10}
11export declare const DefaultRedirectOptions: RedirectOptions;
12export declare function redirectPolicy(maximumRetries?: number): RequestPolicyFactory;
13export declare class RedirectPolicy extends BaseRequestPolicy {
14 readonly maxRetries: number;
15 constructor(nextPolicy: RequestPolicy, options: RequestPolicyOptionsLike, maxRetries?: number);
16 sendRequest(request: WebResourceLike): Promise<HttpOperationResponse>;
17}
18//# sourceMappingURL=redirectPolicy.d.ts.map
\No newline at end of file