Package io.ktor.client.features.cookies

Types

Link copied to clipboard
class AcceptAllCookiesStorage : CookiesStorage

CookiesStorage that stores all the cookies in an in-memory map.

Link copied to clipboard
class ConstantCookiesStorage(cookies: Cookie) : CookiesStorage

CookiesStorage that ignores addCookie and returns a list of specified cookies when constructed.

Link copied to clipboard
interface CookiesStorage : Closeable

Storage for Cookie.

Link copied to clipboard
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.

Functions

Link copied to clipboard
suspend fun CookiesStorage.addCookie(urlString: String, cookie: Cookie)

Add cookie with key urlString to storage.

Link copied to clipboard
suspend fun HttpClient.cookies(url: Url): List<Cookie>

Gets all the cookies for the specified url for this HttpClient.

suspend fun HttpClient.cookies(urlString: String): List<Cookie>

Gets all the cookies for the specified urlString for this HttpClient.

Link copied to clipboard
operator fun List<Cookie>.get(name: String): Cookie?

Find the Cookie by name