import type {FetchResponse} from '@rocicorp/licensing/src/client';
export async function browserSimpleFetch( method: string, url: string, body: string | null, headers: string[][],): Promise<FetchResponse> { const requestInit = { method, body, headers, }; return fetch(url, requestInit);}
export async function mustSimpleFetch( method: string, url: string, body: string | null, headers: string[][],): Promise<FetchResponse> { const resp = await browserSimpleFetch(method, url, body, headers); if (resp.status !== 200) { throw new Error(`Got ${resp.status} fetching ${url}: ${await resp.text()}`); } return resp;}