tryPostBytes

inline suspend fun <B> HttpFetcher.tryPostBytes(resource: String, body: B, headers: Map<String, Any>? = FetchDefaults.Headers, redirect: RequestRedirect? = FetchDefaults.Redirect, abortController: AbortController? = null, bodySerializer: SerializationStrategy<B> = serializer()): 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.tryPost
import com.varabyte.kobweb.browser.http.FetchDefaults
import com.varabyte.kobweb.browser.http.bodyAsBytes
import kotlinx.serialization.serializer
tryPost(resource, body, headers, redirect, abortController, bodySerializer) { bodyAsBytes() }

A version of tryPost that returns its response as a raw byte array.