header

abstract fun header(name: String): String?

Gets a specific header value by name.

Header names are case-insensitive per the HTTP specification. If the header has multiple values, this typically returns the first value or a concatenated string depending on the implementation.

Return

The header value, or null if the header is not present.

Parameters

name

The header name (case-insensitive).