export async function initiateFetchRequest()

in src/utils/LoaderUtils.ts [1:13]


export async function initiateFetchRequest(url: string, useCache: boolean): Promise<Response> {
    const req = await fetch(url, {
        mode: "cors",
        credentials: "omit",
        cache: useCache ? "force-cache" : "default",
    });

    if (req.status != 200) {
        throw new Error(req.status + " Unable to load " + req.url);
    }

    return req;
}