CookiePolicy
interface CookiePolicy
| java.net.CookiePolicy | 
CookiePolicy implementations decide which cookies should be accepted and which should be rejected. Three pre-defined policy implementations are provided, namely ACCEPT_ALL, ACCEPT_NONE and ACCEPT_ORIGINAL_SERVER.
See RFC 2965 sec. 3.3 and 7 for more detail.
Summary
| Public methods | |
|---|---|
| abstract Boolean | shouldAccept(uri: URI!, cookie: HttpCookie!)Will be called to see whether or not this cookie should be accepted. | 
| Properties | |
|---|---|
| static CookiePolicy! | One pre-defined policy which accepts all cookies. | 
| static CookiePolicy! | One pre-defined policy which accepts no cookies. | 
| static CookiePolicy! | One pre-defined policy which only accepts cookies from original server. | 
Public methods
shouldAccept
abstract fun shouldAccept(
uri: URI!,
cookie: HttpCookie!
): Boolean
Will be called to see whether or not this cookie should be accepted.
| Parameters | |
|---|---|
| uri | URI!: the URI to consult accept policy with | 
| cookie | HttpCookie!: the HttpCookie object in question | 
| Return | |
|---|---|
| Boolean | trueif this cookie should be accepted; otherwise,false | 
Properties
ACCEPT_ALL
static val ACCEPT_ALL: CookiePolicy!
One pre-defined policy which accepts all cookies.
ACCEPT_NONE
static val ACCEPT_NONE: CookiePolicy!
One pre-defined policy which accepts no cookies.
ACCEPT_ORIGINAL_SERVER
static val ACCEPT_ORIGINAL_SERVER: CookiePolicy!
One pre-defined policy which only accepts cookies from original server.
