HttpCookies

class HttpCookies(storage: CookiesStorage, defaults: List<suspend CookiesStorage.() -> Unit>) : Closeable

HttpClient plugin that handles sent Cookie, and received Set-Cookie headers, using a specific storage for storing and retrieving cookies.

You can configure the Config.storage and to provide Config.default blocks to set cookies when installing.

Constructors

Link copied to clipboard
fun HttpCookies(storage: CookiesStorage, defaults: List<suspend CookiesStorage.() -> Unit>)

Types

Link copied to clipboard
object Companion : HttpClientFeature<HttpCookies.Config, HttpCookies>
Link copied to clipboard
class Config

HttpCookies configuration.

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
suspend fun get(requestUrl: Url): List<Cookie>

Find all cookies by requestUrl.