ApiFetcher
A class which makes it easier to access a Kobweb API endpoint, instead of using Window.fetch directly.
This class works by wrapping Window.http but specifically for Kobweb API calls (URLs which are prefixed with "/api/").
Properties
Functions
Link copied to clipboard
suspend fun tryOptions(apiPath: String, headers: Map<String, Any>? = FetchDefaults.Headers, redirect: RequestRedirect? = FetchDefaults.Redirect, abortController: AbortController? = null): ByteArray?
Like options, but returns null if the request failed for any reason.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard