postBytes

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

Call POST on a target resource, returning the response body as a raw array of bytes.

If a request body is provided, it is also specified as a raw array of bytes.

See also tryPostBytes, which will return null if the request fails for any reason.