1 | export interface IRequestOptions {
|
2 | |
3 |
|
4 |
|
5 | url: string;
|
6 | |
7 |
|
8 |
|
9 | method?: string;
|
10 | |
11 |
|
12 |
|
13 | headers?: {
|
14 | [key: string]: string;
|
15 | };
|
16 | |
17 |
|
18 |
|
19 | gzip?: boolean;
|
20 | |
21 |
|
22 |
|
23 | encoding?: string | null;
|
24 | }
|
25 | export interface IRequestResponse {
|
26 | |
27 |
|
28 |
|
29 | statusCode: number;
|
30 | |
31 |
|
32 |
|
33 | headers: {
|
34 | [key: string]: string;
|
35 | };
|
36 | }
|
37 | export declare type IRequestCallback = (error: any, response: IRequestResponse, body: any) => void;
|
38 | export declare type IRequest = (options: IRequestOptions, cb?: IRequestCallback) => any;
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 | export declare function extract(uri: string, req?: IRequest | null): Promise<{
|
47 | download: string;
|
48 | filename: string | null;
|
49 | }>;
|