add

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

Appends an entry.

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.