HttpHeaders

data class HttpHeaders(val headers: Map<String, List<String>>)

Helper to parse HTTP request/response headers.

Constructors

Link copied to clipboard
constructor(headers: Map<String, List<String>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Indicates whether this server supports byte range requests.

Link copied to clipboard

The expected content length for this response, when known.

Link copied to clipboard
Link copied to clipboard

Returns the HTTP content range.

Functions

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

Finds the last header matching the given name. In keeping with the HTTP RFC, HTTP header field names are case-insensitive. The returned string can contain a single value or a comma-separated list of values if the field supports it.

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

Finds all the headers matching the given name. In keeping with the HTTP RFC, HTTP header field names are case-insensitive. Each item of the returned list can contain a single value or a comma-separated list of values if the field supports it.