UNPKG

@flagship.io/js-sdk

Version:
21 lines (20 loc) 682 B
export interface IHttpOptions { body?: any; headers?: Record<string, string>; timeout?: number; nextFetchConfig?: Record<string, unknown>; } export interface IHttpResponse { status: number; headers?: Record<string, string>; body: any; } export interface IHttpClient { postAsync(url: string, options: IHttpOptions): Promise<IHttpResponse>; getAsync(url: string, options?: IHttpOptions): Promise<IHttpResponse>; } export declare class HttpClient implements IHttpClient { private getResponse; getAsync(url: string, options?: IHttpOptions): Promise<IHttpResponse>; postAsync(url: string, options: IHttpOptions): Promise<IHttpResponse>; }