addSensitive

fun addSensitive(name: String, value: String)(source)

Appends an entry marked sensitive: it is never printed; an Untrusted outbound-URL policy refuses a request that carries it, and the transport's redirect policy strips it on a cross-origin hop.

Parameters

name

the header name, an RFC 9110 token.

value

the value; stored trimmed of SP and HTAB at the ends.

Throws

if name is empty or not a token, or value contains CR, LF or NUL.