mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-04 08:06:56 +00:00
12 lines
397 B
TypeScript
12 lines
397 B
TypeScript
export const callGetApi = async (input: RequestInfo, fetchInternal = fetch) => {
|
|
return await fetchInternal(input);
|
|
};
|
|
|
|
export const callPostApi = async <T>(input: RequestInfo, payload?: T, fetchInternal = fetch) => {
|
|
return await fetchInternal(input, {
|
|
method: "POST",
|
|
headers: { "Content-Type": "application/json" },
|
|
body: payload ? JSON.stringify(payload) : undefined,
|
|
});
|
|
};
|