You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
591 B
TypeScript

export interface RequestOptions {
ignoreCache?: boolean;
headers?: {
[key: string]: string;
};
timeout?: number;
}
export declare const DEFAULT_REQUEST_OPTIONS: {
ignoreCache: boolean;
headers: {
Accept: string;
};
timeout: number;
};
export interface RequestResult {
ok: boolean;
status: number;
statusText: string;
data: string;
json: <T>() => T;
headers: string;
}
export declare function request(method: 'get' | 'post', url: string, queryParams?: any, body?: any, options?: RequestOptions): Promise<RequestResult>;