UNPKG

sim-sdk-web

Version:

Sim SDK for Web

15 lines (14 loc) 667 B
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE'; interface RequestOptions { url: string; method?: HttpMethod; headers?: Record<string, string>; params?: Record<string, any>; data?: Record<string, any>; } export declare const request: <T>(options: RequestOptions) => Promise<T>; export declare const get: <T>(url: string, params?: Record<string, any>) => Promise<T>; export declare const post: <T>(url: string, data?: Record<string, any>) => Promise<T>; export declare const put: <T>(url: string, data?: Record<string, any>) => Promise<T>; export declare const del: <T>(url: string, data?: Record<string, any>) => Promise<T>; export {};