mirror of
https://github.com/frappe/books.git
synced 2025-01-09 01:44:15 +00:00
11 lines
267 B
TypeScript
11 lines
267 B
TypeScript
import fetch, { RequestInit } from 'node-fetch';
|
|
|
|
export async function sendAPIRequest(
|
|
endpoint: string,
|
|
options: RequestInit | undefined
|
|
) {
|
|
return (await fetch(endpoint, options)).json() as unknown as {
|
|
[key: string]: string | number | boolean;
|
|
}[];
|
|
}
|