Skip to content

requestBytes

//fluxbase-kotlin/io.github.nimbleflux.fluxbase.core/HttpTransport/requestBytes

[jvm]
abstract suspend fun requestBytes(method: HttpMethod, path: String, headers: Map<String, String>): ByteArray

Perform an HTTP method request and return the response body as raw bytes — the binary-safe path used by FluxbaseHttpClient.getBytes (e.g. storage downloads). Unlike request, the body never passes through a text/charset decode, so non-UTF-8 bytes (images, archives) survive intact. Mirrors the TS SDK’s getBlob in sdk/src/fetch.ts.