fetch
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(source)
A Kotlin-idiomatic version of the standard library's Window.fetch function.
Parameters
headers
An optional map of headers to send with the request. Note: If a body is specified, the Content-Length
header will be automatically set. However, any headers set manually will always take precedence.