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 classHttpSetCookie.SameSiteRepresents samesite-value for the SameSite attribute.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.CharSequencedomain()Returns the domain of thisHttpSetCookie.java.lang.CharSequenceexpires()Returns the expire date of thisHttpSetCookieaccording to Expires.booleanisHttpOnly()Checks to see if thisHttpSetCookiecan only be accessed via HTTP.booleanisSecure()Checks to see if thisHttpSetCookieis secure.java.lang.LongmaxAge()Returns the maximum age of thisHttpSetCookiein seconds if specified.java.lang.CharSequencepath()Returns the path of thisHttpSetCookie.HttpSetCookie.SameSitesameSite()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 thisHttpSetCookiein seconds if specified.- Returns:
- The maximum age of this
HttpSetCookie.nullif none specified.
-
expires
@Nullable java.lang.CharSequence expires()
Returns the expire date of thisHttpSetCookieaccording to Expires.- Returns:
- the expire date of this
HttpSetCookieaccording 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 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
-
-