postBytes

inline suspend fun <B> HttpFetcher.postBytes(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.post
import com.varabyte.kobweb.browser.http.FetchDefaults
import com.varabyte.kobweb.browser.http.bodyAsBytes
import kotlinx.serialization.serializer
post(resource, body, headers, redirect, abortController, bodySerializer).bodyAsBytes()

A serialize-friendly version of post that accepts a serializable body and returns its response as a raw byte array.