set

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

Replaces every entry named name with one entry appended at the end, spelled as name and flagged sensitive if any removed entry was.

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.