rawBody
Creates a raw body that uses an identity codec and optional media type.
Return
a RawBody that passes bytes through unchanged.
Parameters
name
friendly name used in error messages when encoding/decoding fails.
mediaType
media type advertised for the body, if any.
fun rawBody(codec: ByteArrayCodec<ByteArray>, mediaType: MediaType? = null, name: String = "bytes"): RawBody(source)
Creates a raw body using the provided codec and optional mediaType.
Return
Parameters
codec
encoder/decoder that understands how to transform the payload bytes.
mediaType
media type advertised for the body, if any.