UNPKG

@skyway-sdk/common

Version:

The official Next Generation JavaScript SDK for SkyWay

27 lines 1.11 kB
import { type AxiosInstance, type AxiosRequestConfig, type AxiosResponse } from 'axios'; /**@internal */ export declare class HttpClient { api: AxiosInstance; constructor(baseURL: string); /**@throws {@link HttpResponse} */ get<T>(url: string, config?: (AxiosRequestConfig<any> & { retry?: (err: HttpResponse) => Promise<boolean>; }) | undefined): Promise<T>; /**@throws {@link HttpResponse} */ post<T>(url: string, data?: any, config?: (AxiosRequestConfig<any> & { retry?: (err: HttpResponse) => Promise<boolean>; }) | undefined): Promise<T>; /**@throws {@link HttpResponse} */ put<T>(url: string, data?: any, config?: (AxiosRequestConfig<any> & { retry?: (err: HttpResponse) => Promise<boolean>; }) | undefined): Promise<T>; /**@throws {@link HttpResponse} */ delete<T>(url: string, config?: (AxiosRequestConfig<any> & { retry?: (err: HttpResponse) => Promise<boolean>; }) | undefined): Promise<T>; } /**@internal */ export type HttpResponse = AxiosResponse & { message: string; }; //# sourceMappingURL=http.d.ts.map