HeadersSingleImpl

class HeadersSingleImpl : Headers, StringValuesSingleImpl

Constructors

<init>

HeadersSingleImpl(name: String, values: List<String>)

Inherited Properties

name

val name: String

values

val values: List<String>

Functions

toString

fun toString(): String

Extension Functions

filter

fun StringValues.filter(
    keepEmpty: Boolean = false,
    predicate: (String, String) -> Boolean
): StringValues

Create a new instance of StringValues filtered by the specified predicate

flattenEntries

fun StringValues.flattenEntries(): List<Pair<String, String>>

Copy values to a list of pairs

flattenForEach

fun StringValues.flattenForEach(
    block: (String, String) -> Unit
): Unit

Invoke block function for every value pair

parseVersions

fun Headers.parseVersions(): List<Version>

Retrieves LastModified and ETag versions from headers.

toMap

fun StringValues.toMap(): Map<String, List<String>>

Copy values to a new independent map