import {FetchHttpHandler, FetchHttpHandlerOptions} from '@aws-sdk/fetch-http-handler'; import {HttpHandlerOptions} from '@aws-sdk/types'; import {HttpResponse, HttpRequest} from '@aws-sdk/protocol-http'; import {Subject} from 'rxjs'; /** * 自定义aws sdk s3client的HttpHandler。代码hack自aws-sdk的FetchHttpHandler * * @author biming */ export declare class S3ClientHttpRequestHandler extends FetchHttpHandler { onProgress$: Subject<{ path: string; progressEvent: ProgressEvent; }>; private xmlHttpRequest; private myRequestTimeout; constructor(xmlHttpRequest: XMLHttpRequest, {requestTimeout}?: FetchHttpHandlerOptions); handle(request: HttpRequest, {abortSignal}?: HttpHandlerOptions): Promise<{ response: HttpResponse; }>; /** * handles a request by XHR instead of fetch * this is a copy the `handle` method of the `FetchHttpHandler` class of @aws-sdk/fetch-http-handler * replacing the `Fetch`part with XHR */ private handleByXhr; private requestTimeoutFn; }