JsonBody

data class JsonBody<T : Any>(val codec: ByteArrayCodec<T>, val name: String) : Body<T> (source)

Structured body advertised as JSON.

Constructors

Link copied to clipboard
constructor(codec: ByteArrayCodec<T>, name: String)

Properties

Link copied to clipboard
open override val codec: ByteArrayCodec<T>

Codec responsible for the byte-level representation of the payload.

Link copied to clipboard
open override val mediaType: MediaType

Preferred media type for the body, or null when the payload is not tied to a specific one.

Link copied to clipboard
open override val name: String

Short diagnostic name used in generated code and codec error messages.