checkHeader

fun checkHeader(header: String, predicate: ApplicationCall.(String) -> Boolean = { true })

Checks if the given header is present on each call to the server, and if its value conforms to the optional predicate. If conditions already exist for the header, they must all be satisfied.

Parameters

header

the name of the header to validate

predicate

the condition to check on the value of the header

See also