remove

open override fun remove(key: String): String?

Removes the mapping for the specified key from this header if present.

Return

The previous value associated with the key, or null if there was no mapping

Parameters

key

The key whose mapping is to be removed

Throws

if the header is read-only


open override fun remove(key: String, value: String): Boolean

Removes the entry for the specified key only if it is currently mapped to the specified value.

Return

true if the value was removed, false otherwise

Parameters

key

The key whose mapping is to be removed

value

The value expected to be associated with the key

Throws

if the header is read-only