UNPKG

caprover-api

Version:
16 lines (15 loc) 670 B
export default class HttpClient { private baseUrl; private authTokenProvider; private onLoginRequested; readonly GET = "GET"; readonly POST = "POST"; isDestroyed: boolean; constructor(baseUrl: string, authTokenProvider: () => Promise<string>, onLoginRequested: () => Promise<void>); createHeaders(): Promise<any>; destroy(): void; fetch(method: 'GET' | 'POST', endpoint: string, variables: any): () => Promise<any>; fetchInternal(method: 'GET' | 'POST', endpoint: string, variables: any): Promise<any>; getReq(endpoint: string, variables: any): Promise<any>; postReq(endpoint: string, variables: any): Promise<any>; }