ConstantCookiesStorage

class ConstantCookiesStorage : CookiesStorage

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

Constructors

<init>

ConstantCookiesStorage(vararg cookies: Cookie)

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

Functions

addCookie

suspend fun addCookie(requestUrl: Url, cookie: Cookie): Unit

Sets a cookie for the specified host.

get

suspend fun get(requestUrl: Url): List<Cookie>

Gets a map of String to Cookie for a specific host.

Extension Functions

addCookie

suspend fun CookiesStorage.addCookie(
    urlString: String,
    cookie: Cookie
): Unit