deleteBytes

suspend fun deleteBytes(apiPath: String, headers: Map<String, Any>? = FetchDefaults.Headers, redirect: RequestRedirect? = FetchDefaults.Redirect, abortController: AbortController? = null): ByteArray(source)

Deprecated

We are phasing out the *Bytes version of network requests, now that we have new versions that return `Response` objects directly.

Replace with

import com.varabyte.kobweb.browser.http.FetchDefaults
import com.varabyte.kobweb.browser.http.bodyAsBytes
delete(apiPath, headers, redirect, abortController).bodyAsBytes()

Call DELETE on a target API path, returning the response body as a raw array of bytes.

See also tryDeleteBytes, which will return null if the request fails.

Note: you should NOT prepend your path with "api/", as that will be added automatically.