export interface UserSettings { baseUrl: string; } export interface Settings { baseUrl: string; } export interface Options { secure?: boolean; } export interface Body { [key: string]: string | number; } export interface Headers { [key: string]: string; } export interface Ids { [key: string]: string; } export interface Response { status: number; body: any; headers: { [key: string]: string; }; } export declare type Id = string; export declare type Method = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE'; export default class Request { static settings: Settings; private static requests; static init(settings: UserSettings): void; static abort(id: string): void; static get(path: string, body?: Body, id?: Id, options?: Options): Promise; static head(path: string, body: Body, id?: Id, options?: Options): Promise; static post(path: string, body: Body, id?: Id, options?: Options): Promise; static put(path: string, body: Body, id?: Id, options?: Options): Promise; static remove(path: string, body: Body, id?: Id, options?: Options): Promise; protected static defaultRequest(method: Method, path: string, body: Body, id?: Id, options?: Options): Promise; private static getHeaders(options); private static getFullPath(path); private static addItemsToForm(form, names, obj); private static addItemToForm(form, names, value); }