Package-level declarations

Types

Link copied to clipboard
class AcceptAllCookiesStorage(clock: () -> Long = { getTimeMillis() }) : CookiesStorage

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

Link copied to clipboard

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

Link copied to clipboard

A storage for Cookie.

Link copied to clipboard

A plugin that allows you to keep cookies between calls in a storage. By default, it uses an in-memory storage, but you can also implement a persistent storage using CookiesStorage.

Functions

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

Adds a cookie with the urlString key 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
fun Cookie.fillDefaults(requestUrl: Url): Cookie

Fills Cookie with default values from requestUrl.

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

Gets the specified Cookie by its name.

Link copied to clipboard
fun Cookie.matches(requestUrl: Url): Boolean

Checks if Cookie matches requestUrl.