SimpleRange

sealed interface SimpleRange<in T>(source)

A SimpleRange is either a value of some type, T, or a wildcard, represented in headers as "*", and matching any value of T. The value is constrained to being represented in HTTP headers by a single token, with no parameters.

This is suitable for headers Accept-Charset, Accept-Encoding, and Accept-Language, but not Accept.

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun <T> SimpleRange<T>.forHeader(valueForHeader: (T) -> String): Pair<String, Map<String, String>>
Link copied to clipboard
abstract fun matches(t: T): Boolean