| Modifier and Type | Method and Description |
|---|---|
Cookie |
build()
Returns a newly created
Cookie with the properties set so far. |
CookieBuilder |
domain(String domain)
Sets the domain of the
Cookie. |
CookieBuilder |
httpOnly(boolean httpOnly)
Sets whether the
Cookie is HTTP only. |
CookieBuilder |
maxAge(long maxAge)
Sets the maximum age of the
Cookie in seconds. |
CookieBuilder |
name(String name)
Sets the name of the
Cookie. |
CookieBuilder |
path(String path)
Sets the path of the
Cookie. |
CookieBuilder |
sameSite(String sameSite)
|
CookieBuilder |
secure(boolean secure)
Sets the security status of the
Cookie. |
CookieBuilder |
value(String value)
Sets the value of the
Cookie. |
CookieBuilder |
valueQuoted(boolean valueQuoted)
Sets whether the value of the
Cookie needs to be wrapped with double quotes when encoding. |
public CookieBuilder name(String name)
Cookie.public CookieBuilder value(String value)
Cookie.public CookieBuilder valueQuoted(boolean valueQuoted)
public CookieBuilder domain(String domain)
Cookie.public CookieBuilder path(String path)
Cookie.public CookieBuilder maxAge(long maxAge)
Cookie in seconds. If an age of 0 is specified,
the Cookie will be automatically removed by browser because it will expire immediately.
If Cookie.UNDEFINED_MAX_AGE is specified, this Cookie will be removed when the
browser is closed. If unspecified, Cookie.UNDEFINED_MAX_AGE will be used.maxAge - The maximum age of this Cookie in secondspublic CookieBuilder secure(boolean secure)
Cookie. If unspecified, false will be used.public CookieBuilder httpOnly(boolean httpOnly)
public CookieBuilder sameSite(String sameSite)
Copyright © 2020 LeanCloud. All rights reserved.