MutableHeaders

Mutable non case sensitive HTTP headers.

Functions

Link copied to clipboard
open fun add(name: String, value: String)

Add a header, adding it to the existing header after a , if a this header has already been set.

Link copied to clipboard
open infix fun addFrom(other: Iterable<Pair<String, String>>)
open infix fun addFrom(other: Map<String, String>)

Add multiple headers.

Link copied to clipboard
open operator fun contains(name: String): Boolean

Whether the value of name is set.

Link copied to clipboard
abstract operator fun get(name: String): String?

Get the value of a header.

Link copied to clipboard
open operator fun plusAssign(other: HeaderProvider)

Add headers from a provider.

open operator fun plusAssign(header: Pair<String, String>)

Add a header.

open operator fun plusAssign(other: Iterable<Pair<String, String>>)
open operator fun plusAssign(other: Map<String, String>)

Add multiple headers.

Link copied to clipboard
abstract operator fun set(name: String, value: String)

Set a header.

Link copied to clipboard
open infix fun setFrom(other: Iterable<Pair<String, String>>)
open infix fun setFrom(other: Map<String, String>)

Set multiple headers.

Link copied to clipboard
abstract fun toMap(): Map<String, String>
Link copied to clipboard
open operator fun HeaderProvider.unaryPlus()

Add headers from a provider.

open operator fun Iterable<Pair<String, String>>.unaryPlus()
open operator fun Map<String, String>.unaryPlus()

Add multiple headers.