autumn-js
Version:
Autumn JS Library
16 lines (14 loc) • 417 B
TypeScript
type HttpClientConfig = {
backendUrl?: string;
pathPrefix: string;
includeCredentials?: boolean;
headers?: Record<string, string>;
};
declare const createHttpClient: (config: HttpClientConfig) => {
request: <T>({ route, body, method, }: {
route: string;
body?: unknown;
method?: "GET" | "POST";
}) => Promise<T>;
};
export { type HttpClientConfig, createHttpClient };