class MutableHeaders : Headers, MutableIterable<Header>
(source)
A collection of HTTP Headers (mutable) of a Request or Response.
MutableHeaders(vararg pairs: Pair<String, String>)
A collection of HTTP Headers (mutable) of a Request or Response. |
val size: Int
Returns the number of headers (key / value combinations). |
fun append(name: String, value: String): MutableHeaders
Append a header without removing the headers already present. |
|
operator fun contains(name: String): Boolean
|
|
fun get(index: Int): Header
Gets the Header at the specified index. fun get(name: String): String?
Returns the last value corresponding to the specified header field name. Or null if the header does not exist. |
|
fun getAll(name: String): List<String>
Returns the list of values corresponding to the specified header field name. |
|
fun iterator(): MutableIterator<Header>
Returns an iterator over the headers that supports removing elements during iteration. |
|
fun set(index: Int, header: Header): Unit
Sets the Header at the specified index. fun set(name: String, value: String): MutableHeaders
Set the only occurrence of the header; potentially overriding an already existing header. |