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 enumRepresents samesite-value for the SameSite attribute. -
Method Summary
Modifier and TypeMethodDescriptiondomain()Returns the domain of thisHttpSetCookie.expires()Returns the expire date of thisHttpSetCookieaccording to Expires.booleanChecks to see if thisHttpSetCookiecan only be accessed via HTTP.booleanisSecure()Checks to see if thisHttpSetCookieis secure.maxAge()Returns the maximum age of thisHttpSetCookiein 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 thisHttpSetCookiein seconds if specified.- Returns:
- The maximum age of this
HttpSetCookie.nullif none specified.
-
expires
Returns the expire date of thisHttpSetCookieaccording to Expires.- Returns:
- the expire date of this
HttpSetCookieaccording to Expires.
-
sameSite
Get the value for the SameSite attribute.- Returns:
- The value for the SameSite attribute.
-
isSecure
boolean isSecure()Checks to see if thisHttpSetCookieis secure.- Returns:
- True if this
HttpSetCookieis secure, otherwise false
-
isHttpOnly
boolean isHttpOnly()Checks to see if thisHttpSetCookiecan only be accessed via HTTP. If this returns true, theHttpSetCookiecannot be accessed through client side script - But only if the browser supports it. For more information, please look here- Returns:
- True if this
HttpSetCookieis HTTP-only or false if it isn't
-