osmos-web-sdk
Version:
OnlineSales.ai Web SDK for Vue and React projects
26 lines • 624 B
TypeScript
export declare class HttpClient {
private retryCount;
private debugMode;
constructor(retryCount?: number, debugMode?: boolean);
/**
* 发送HTTP请求
*/
request<T>(url: string, options?: RequestInit, retryAttempt?: number): Promise<T>;
/**
* GET请求
*/
get<T>(url: string, params?: Record<string, any>): Promise<T>;
/**
* POST请求
*/
post<T>(url: string, data?: any): Promise<T>;
/**
* 构建查询字符串
*/
private buildQueryString;
/**
* 延迟函数
*/
private sleep;
}
//# sourceMappingURL=http-client.d.ts.map