Package io.servicetalk.http.api
Interface HttpSetCookie
- All Superinterfaces:
HttpCookiePair
- All Known Implementing Classes:
DefaultHttpSetCookie
An interface defining a set-cookie-string.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Represents samesite-value for the SameSite attribute. -
Method Summary
Modifier and TypeMethodDescriptiondomain()
Returns the domain of thisHttpSetCookie
.expires()
Returns the expire date of thisHttpSetCookie
according to Expires.boolean
Checks to see if thisHttpSetCookie
can only be accessed via HTTP.boolean
isSecure()
Checks to see if thisHttpSetCookie
is secure.maxAge()
Returns the maximum age of thisHttpSetCookie
in seconds if specified.path()
Returns the path of thisHttpSetCookie
.sameSite()
Get the value for the SameSite attribute.Methods inherited from interface io.servicetalk.http.api.HttpCookiePair
encoded, isWrapped, name, value
-
Method Details
-
domain
Returns the domain of thisHttpSetCookie
.- Returns:
- The domain of this
HttpSetCookie
-
path
Returns the path of thisHttpSetCookie
.- Returns:
- The
HttpSetCookie
's path
-
maxAge
Returns the maximum age of thisHttpSetCookie
in seconds if specified.- Returns:
- The maximum age of this
HttpSetCookie
.null
if none specified.
-
expires
Returns the expire date of thisHttpSetCookie
according to Expires.- Returns:
- the expire date of this
HttpSetCookie
according to Expires.
-
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
-