import { httpBrowser } from "./functions/adapters/httpBrowser"; export { httpBrowser } from "./functions/adapters/httpBrowser"; export { fetchRequest } from "./functions/browser/fetchClient"; export { readJsonFile, getConfigContent, getConfigVar, } from "./functions/browser/readUtils"; export * from "./functions/secure_utils"; export * from "./functions/shared"; export * from "./types"; export function makeRequest(method: string) { return async function ( url: string, body?: any, opts: any = {} ): Promise { const response = await httpBrowser(method, url, body, opts); return response.data as T; }; } export const get = makeRequest("GET"); export const post = makeRequest("POST"); export const put = makeRequest("PUT"); export const del = makeRequest("DELETE"); export const http = { get, post, put, del };