Empty

Represents empty fields for Headers, Query Params, Path Params, and Cookies.

Properties

Link copied to clipboard
open override val field: String
Link copied to clipboard
open override val fields: List<String>

The fields for this header field.

Link copied to clipboard
open override val name: String

Display name for this field, derived from fields.

Functions

Link copied to clipboard
infix fun <A, B> CookieField<A>.and(other: CookieField<B>): CookiePairField<A, B>

Creates a pair of cookie fields as CookiePairField.

@JvmName(name = "andEmptyPathFieldLeft")
infix fun <B> Empty.and(other: PathField<B>): PathField<B>

Creates a pair of path fields as PathPairField, optimizing for Empty on the left.

@JvmName(name = "andEmptyQueryFieldLeft")
infix fun <B> Empty.and(other: QueryField<B>): QueryField<B>

Creates a pair of query fields as QueryPairField, optimizing for Empty on the left.

infix fun <A, B> HeaderField<A>.and(other: HeaderField<B>): HeaderPairField<A, B>

Creates a pair of header fields as HeaderPairField.

@JvmName(name = "andEmptyPathFieldRight")
infix fun <A> PathField<A>.and(other: Empty): PathField<A>

Creates a pair of path fields as PathPairField, optimizing for Empty on the right.

infix fun <A, B> PathField<A>.and(other: PathField<B>): PathPairField<A, B>

Creates a pair of path fields as PathPairField.

@JvmName(name = "andEmptyQueryFieldRight")
infix fun <A> QueryField<A>.and(other: Empty): QueryField<A>

Creates a pair of query fields as QueryPairField, optimizing for Empty on the right.

infix fun <A, B> QueryField<A>.and(other: QueryField<B>): QueryPairField<A, B>

Creates a pair of query fields as QueryPairField.

Link copied to clipboard
infix fun <T> HeaderField<T>.bind(value: T): T

Binds a value to a HeaderField for readable typed header construction. This is a pass-through that ensures the value matches the field type.

Link copied to clipboard
open fun clear(): Cookie

Creates an empty Cookie with the properties defined in this field for the purpose of clearing an already-existent cookie.

Link copied to clipboard
open infix fun create(value: String): Cookie

Creates a Cookie using the properties defined in this field.

open fun create(value: Empty): QueryParams

Creates a QueryParams object from the given value.

Link copied to clipboard
open fun createCookies(value: Empty): Cookies

Creates a Cookies object from the given value.

Link copied to clipboard
open fun createHeaders(value: Empty): Headers

Creates a Headers object from the given value.

Link copied to clipboard
open fun createPath(value: Empty): PathParams

Creates a PathParams object from the given value.

Link copied to clipboard
context(_: Raise<Issue>)
open infix override fun decode(value: Map<String, String>): Empty
context(_: Raise<Issue>)
open override fun decode(headers: Headers): Empty
context(_: Raise<Issue>)
open override fun decode(params: QueryParams): Empty
Link copied to clipboard
open fun domain(): String?

The domain for which the cookie is valid.

Link copied to clipboard
open override fun encodeCookies(value: Empty): List<Cookie>
Link copied to clipboard
open override fun encodeHeaders(value: Empty): Map<String, List<String>>
Link copied to clipboard
open override fun encodePath(value: Empty): Map<String, String>
Link copied to clipboard
open override fun encodeQuery(value: Empty): Map<String, List<String>>
Link copied to clipboard
open override fun flatten(): List<Nothing>

Flattens the HeaderField into its constituent fields.

Link copied to clipboard
open fun isHttpOnly(): Boolean

Whether this cookie is intended to be server-side only.

Link copied to clipboard
open fun maxAge(): Long?

The maximum age of the cookie in seconds.

Link copied to clipboard

Marks a cookie field as optional.

Marks a header field as optional.

Marks a path field as optional.

Marks a query field as optional.

Link copied to clipboard
open fun path(): String?

The path for which the cookie is valid.

Link copied to clipboard
open fun sameSite(): SameSite

The SameSite attribute of the cookie.

Link copied to clipboard
open fun secure(): Boolean

Whether the cookie should only be sent over secure connections.