CookieStore

sealed trait CookieStore

Provides utilities for persistent cookies.

See also:
Companion:
object
class Object
trait Matchable
class Any
object Null.type

Value members

Abstract methods

def clear(expiredOnly: Boolean): CookieStore

Clears all persistent cookies.

Clears all persistent cookies.

Value parameters:
expiredOnly

specifies whether expired cookies only are cleared

Returns:

this cookie store

def get(target: Uri): Seq[PlainCookie]

Gets cookies that should be used in request to supplied target.

Gets cookies that should be used in request to supplied target.

Value parameters:
target

request URI

Throws:
java.lang.IllegalArgumentException

if target is not HTTP or WebSocket URI

Lists all persistent cookies.

Lists all persistent cookies.

def put(target: Uri, cookies: Seq[SetCookie]): CookieStore

Adds cookies that are in response to request of supplied target.

Adds cookies that are in response to request of supplied target.

Value parameters:
cookies

response cookies

target

request URI

Returns:

this cookie store

Throws:
java.lang.IllegalArgumentException

if target is not HTTP or WebSocket URI

def size: Int

Gets number of cookies in cookie store.

Gets number of cookies in cookie store.

Concrete methods

def put(target: Uri, one: SetCookie, more: SetCookie*): CookieStore

Adds cookies that are in response to request of supplied target.

Adds cookies that are in response to request of supplied target.

Value parameters:
more

additional response cookies

one

response cookie

target

request URI

Returns:

this cookie store

Throws:
java.lang.IllegalArgumentException

if target is not HTTP or WebSocket URI