sgod-library-frontend
Version:
Thư viện component UI Frontend
23 lines (22 loc) • 770 B
TypeScript
type CustomOptions = Omit<RequestInit, "method"> & {
baseUrl?: string | undefined;
};
declare const http: {
get<Response>(url: string, options?: Omit<CustomOptions, "body"> | undefined): Promise<{
status: number;
payload: Response;
}>;
post<Response>(url: string, body: any, options?: Omit<CustomOptions, "body"> | undefined): Promise<{
status: number;
payload: Response;
}>;
put<Response>(url: string, body: any, options?: Omit<CustomOptions, "body"> | undefined): Promise<{
status: number;
payload: Response;
}>;
delete<Response>(url: string, options?: Omit<CustomOptions, "body"> | undefined): Promise<{
status: number;
payload: Response;
}>;
};
export default http;