cookie

fun cookie(key: String): String?

Retrieves a cookie value by key.

Return

The cookie value or null if not found.

Parameters

key

The cookie key.


fun cookie(key: String, defaultValue: String? = null): String?

Retrieves a cookie value by key with a default value if not found.

Return

The cookie value or the default value if not found.

Parameters

key

The cookie key.

defaultValue

The default value to return if the cookie is not found.