1 | import { GaxiosError, GaxiosOptions, GaxiosPromise, GaxiosResponse } from 'gaxios';
|
2 | export interface Transporter {
|
3 | request<T>(opts: GaxiosOptions): GaxiosPromise<T>;
|
4 | request<T>(opts: GaxiosOptions, callback?: BodyResponseCallback<T>): void;
|
5 | request<T>(opts: GaxiosOptions, callback?: BodyResponseCallback<T>): GaxiosPromise | void;
|
6 | }
|
7 | export interface BodyResponseCallback<T> {
|
8 | (err: Error | null, res?: GaxiosResponse<T> | null): void;
|
9 | }
|
10 | export interface RequestError extends GaxiosError {
|
11 | errors: Error[];
|
12 | }
|
13 | export declare class DefaultTransporter {
|
14 | |
15 |
|
16 |
|
17 | static readonly USER_AGENT: string;
|
18 | |
19 |
|
20 |
|
21 |
|
22 |
|
23 | configure(opts?: GaxiosOptions): GaxiosOptions;
|
24 | |
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | request<T>(opts: GaxiosOptions): GaxiosPromise<T>;
|
31 | request<T>(opts: GaxiosOptions, callback?: BodyResponseCallback<T>): void;
|
32 | |
33 |
|
34 |
|
35 | private processError;
|
36 | }
|