Fetches the specified resource. Works like the browser's fetch() function, but supports a few extensions.
fetch()
Optional
https://developer.mozilla.org/en-US/docs/Web/API/fetch
Basic usage:
import { apprtFetch } from "apprt-fetch";const response = await apprtFetch("https://httpbin.org/get");if (!response.ok) { throw new Error(`Request failed with status: ${response.status}`);}const data = await response.json(); Copy
import { apprtFetch } from "apprt-fetch";const response = await apprtFetch("https://httpbin.org/get");if (!response.ok) { throw new Error(`Request failed with status: ${response.status}`);}const data = await response.json();
See the bundle README for more advanced use cases.
README
Fetches the specified resource. Works like the browser's
fetch()
function, but supports a few extensions.