Package io.servicetalk.http.api
Interface HttpSetCookie
-
- All Superinterfaces:
HttpCookiePair
- All Known Implementing Classes:
DefaultHttpSetCookie
public interface HttpSetCookie extends HttpCookiePair
An interface defining a set-cookie-string.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
HttpSetCookie.SameSite
Represents samesite-value for the SameSite attribute.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.CharSequence
domain()
Returns the domain of thisHttpSetCookie
.java.lang.CharSequence
expires()
Returns the expire date of thisHttpSetCookie
according to Expires.boolean
isHttpOnly()
Checks to see if thisHttpSetCookie
can only be accessed via HTTP.boolean
isSecure()
Checks to see if thisHttpSetCookie
is secure.java.lang.Long
maxAge()
Returns the maximum age of thisHttpSetCookie
in seconds if specified.java.lang.CharSequence
path()
Returns the path of thisHttpSetCookie
.HttpSetCookie.SameSite
sameSite()
Get the value for the SameSite attribute.-
Methods inherited from interface io.servicetalk.http.api.HttpCookiePair
encoded, isWrapped, name, value
-
-
-
-
Method Detail
-
domain
@Nullable java.lang.CharSequence domain()
Returns the domain of thisHttpSetCookie
.- Returns:
- The domain of this
HttpSetCookie
-
path
@Nullable java.lang.CharSequence path()
Returns the path of thisHttpSetCookie
.- Returns:
- The
HttpSetCookie
's path
-
maxAge
@Nullable java.lang.Long maxAge()
Returns the maximum age of thisHttpSetCookie
in seconds if specified.- Returns:
- The maximum age of this
HttpSetCookie
.null
if none specified.
-
expires
@Nullable java.lang.CharSequence expires()
Returns the expire date of thisHttpSetCookie
according to Expires.- Returns:
- the expire date of this
HttpSetCookie
according to Expires.
-
sameSite
@Nullable HttpSetCookie.SameSite sameSite()
Get the value for the SameSite attribute.- Returns:
- The value for the SameSite attribute.
-
isSecure
boolean isSecure()
Checks to see if thisHttpSetCookie
is secure.- Returns:
- True if this
HttpSetCookie
is secure, otherwise false
-
isHttpOnly
boolean isHttpOnly()
Checks to see if thisHttpSetCookie
can only be accessed via HTTP. If this returns true, theHttpSetCookie
cannot be accessed through client side script - But only if the browser supports it. For more information, please look here- Returns:
- True if this
HttpSetCookie
is HTTP-only or false if it isn't
-
-