ResponseCookies

class ResponseCookies(response: ApplicationResponse, secureTransport: Boolean)

Server's response cookies.

See also

Constructors

Link copied to clipboard
fun ResponseCookies(response: ApplicationResponse, secureTransport: Boolean)

Functions

Link copied to clipboard
fun append(item: <ERROR CLASS>)

Appends a cookie item using the Set-Cookie response header.

fun append(name: String, value: String, encoding: <ERROR CLASS> = CookieEncoding.URI_ENCODING, maxAge: Int, expires: <ERROR CLASS>? = null, domain: String? = null, path: String? = null, secure: Boolean = false, httpOnly: Boolean = false, extensions: Map<String, String?> = emptyMap())
fun append(name: String, value: String, encoding: <ERROR CLASS> = CookieEncoding.URI_ENCODING, maxAge: Long = 0, expires: <ERROR CLASS>? = null, domain: String? = null, path: String? = null, secure: Boolean = false, httpOnly: Boolean = false, extensions: Map<String, String?> = emptyMap())

Appends a cookie using the Set-Cookie response header from the specified parameters.

Link copied to clipboard
fun appendExpired(name: String, domain: String? = null, path: String? = null)

Appends an already expired cookie. Useful to remove client cookies.

Link copied to clipboard
operator fun get(name: String): <ERROR CLASS>?

Gets a cookie from a response's Set-Cookie header.