header

inline fun <H : Any> header(name: String, codec: StringCodec<H>): Header<H>(source)

Creates a header definition with the given name and codec.

Return

header definition that requires a value by default.

Parameters

name

header name using canonical casing.

codec

codec used to encode and decode header values.

See also


Shorthand accessor to factory helpers for headers.