mirror of
https://github.com/frappe/books.git
synced 2025-01-09 09:50:27 +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;
|
||
|
}[];
|
||
|
}
|