ResponseHeaders

abstract class ResponseHeaders

Server's response headers.

See also

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Builds a Headers instance from a response header values.

Link copied to clipboard
fun append(name: String, value: String, safeOnly: Boolean = true)

Appends a response header with the specified name and value.

Link copied to clipboard
fun ResponseHeaders.appendIfAbsent(name: String, value: String, safeOnly: Boolean = true)

Appends a response header with the specified name and value if this is no header with name yet.

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

Checks whether a name response header is set.

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

Gets a first response header with the specified name or returns null.

Link copied to clipboard
fun values(name: String): List<String>

Gets values of a response header with the specified name.