UNPKG

784 BTypeScriptView Raw
1import { HttpHandler, HttpRequest, HttpResponse } from "@aws-sdk/protocol-http";
2import { HttpHandlerOptions, Provider } from "@aws-sdk/types";
3/**
4 * Represents the http options that can be passed to a browser http client.
5 */
6export interface FetchHttpHandlerOptions {
7 /**
8 * The number of milliseconds a request can take before being automatically
9 * terminated.
10 */
11 requestTimeout?: number;
12}
13export declare class FetchHttpHandler implements HttpHandler {
14 private config?;
15 private readonly configProvider?;
16 constructor(options?: FetchHttpHandlerOptions | Provider<FetchHttpHandlerOptions | undefined>);
17 destroy(): void;
18 handle(request: HttpRequest, { abortSignal }?: HttpHandlerOptions): Promise<{
19 response: HttpResponse;
20 }>;
21}