Package | Description |
---|---|
ej.hoka.http |
default HTTP package.
|
Modifier and Type | Method and Description |
---|---|
static Cookie.Builder |
Cookie.builder()
Configures and builds a cookie.
|
Cookie.Builder |
Cookie.Builder.domain(java.lang.String domain)
Domain=<domain-value> Optional
Host to which the cookie will be sent. |
Cookie.Builder |
Cookie.Builder.expires(java.util.Date expires)
Expires=<date> Optional
The maximum lifetime of the cookie as an HTTP-date timestamp. |
Cookie.Builder |
Cookie.Builder.httpOnly()
HttpOnly Optional
Forbids JavaScript from accessing the cookie, for example, through the Document.cookie property.
|
Cookie.Builder |
Cookie.Builder.maxAge(int maxAge)
Max-Age=<number> Optional
Number of seconds until the cookie expires. |
Cookie.Builder |
Cookie.Builder.name(java.lang.String name)
A
<cookie-name> can be any US-ASCII characters, except control characters, spaces, or tabs. |
Cookie.Builder |
Cookie.Builder.path(java.lang.String path)
Path=<path-value> Optional
A path that must exist in the requested URL, or the browser won't send the Cookie header. |
Cookie.Builder |
Cookie.Builder.sameSite(Cookie.SameSite sameSite)
SameSite=<samesite-value> Optional
Controls whether a cookie is sent with cross-origin requests, providing some protection against cross-site
request forgery attacks (CSRF). |
Cookie.Builder |
Cookie.Builder.secure()
Secure Optional
Cookie is only sent to the server when a request is made with the https: scheme (except on localhost), and
therefore is more resistent to man-in-the-middle attacks.
|
Cookie.Builder |
Cookie.Builder.value(java.lang.String value)
A
<cookie-value> can optionally be wrapped in double quotes and include any US-ASCII characters
excluding control characters, Whitespace, double quotes, comma, semicolon, and backslash. |