Package-level declarations
Types
Link copied to clipboard
class AbortController
A class which can be used to abort an API request after it was made.
Link copied to clipboard
object FetchDefaults
Default values for fetch (or methods that delegate to fetch).
Link copied to clipboard
A class with a slightly friendlier API than using Window.fetch directly by providing HTTP method helper methods.
Link copied to clipboard
Link copied to clipboard
An exception that gets thrown if we receive a response whose code is not in the 200 (OK) range.
Functions
Link copied to clipboard
suspend fun Window.fetch(method: HttpMethod, resource: String, headers: Map<String, Any>? = FetchDefaults.Headers, body: ByteArray? = null, redirect: RequestRedirect? = FetchDefaults.Redirect, abortController: AbortController? = null): ByteArray
A Kotlin-idiomatic version of the standard library's Window.fetch function.
Link copied to clipboard