1 |
|
2 | import { HttpHandlerOptions } from '@aws-sdk/types';
|
3 | import { HttpHandler, HttpRequest, HttpResponse } from '@aws-sdk/protocol-http';
|
4 | import { CancelTokenSource, AxiosRequestHeaders, AxiosRequestTransformer } from 'axios';
|
5 | import { FetchHttpHandlerOptions } from '@aws-sdk/fetch-http-handler';
|
6 | import * as events from 'events';
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | interface AxiosTransformer extends Partial<AxiosRequestTransformer> {
|
14 | (data: any, headers: AxiosRequestHeaders): any;
|
15 | }
|
16 | export declare const SEND_UPLOAD_PROGRESS_EVENT = "sendUploadProgress";
|
17 | export declare const SEND_DOWNLOAD_PROGRESS_EVENT = "sendDownloadProgress";
|
18 | export declare type ErrorWithResponse = {
|
19 | response: {
|
20 | status: number;
|
21 | } & {
|
22 | [key: string]: any;
|
23 | };
|
24 | };
|
25 | export declare const reactNativeRequestTransformer: AxiosTransformer[];
|
26 | export declare type AxiosHttpHandlerOptions = HttpHandlerOptions & {
|
27 | cancelTokenSource?: CancelTokenSource;
|
28 | emitter?: events.EventEmitter;
|
29 | };
|
30 | export declare class AxiosHttpHandler implements HttpHandler {
|
31 | private readonly httpOptions;
|
32 | private readonly emitter?;
|
33 | private readonly cancelTokenSource?;
|
34 | constructor(httpOptions?: FetchHttpHandlerOptions, emitter?: events.EventEmitter, cancelTokenSource?: CancelTokenSource);
|
35 | destroy(): void;
|
36 | handle(request: HttpRequest, options: AxiosHttpHandlerOptions): Promise<{
|
37 | response: HttpResponse;
|
38 | }>;
|
39 | }
|
40 | export {};
|