Class HttpCookie
java.lang.Object
org.apache.pekko.http.javadsl.model.headers.HttpCookie
org.apache.pekko.http.scaladsl.model.headers.HttpCookie
- All Implemented Interfaces:
Serializable,Renderable,ToStringRenderable,scala.Equals,scala.Product
public final class HttpCookie
extends HttpCookie
implements ToStringRenderable, scala.Product, Serializable, scala.Equals
for a full definition of the http cookie header fields, see
http://tools.ietf.org/html/rfc6265
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpCookieapply(String name, String value, scala.Option<DateTime> expires, scala.Option<Object> maxAge, scala.Option<String> domain, scala.Option<String> path, boolean secure, boolean httpOnly, scala.Option<String> extension) You are encouraged to provide only 'name' and 'value' here, and use 'withXxx' methods to populate other fields.booleancopy(String name, String value, scala.Option<DateTime> expires, scala.Option<Object> maxAge, scala.Option<String> domain, scala.Option<String> path, boolean secure, boolean httpOnly, scala.Option<String> extension, scala.Option<SameSite> sameSite) scala.Option<String>domain()static org.parboiled2.CharPredicatebooleanscala.Option<DateTime>expires()scala.Option<String>Java APIJava APIJava APIJava APIgetPath()Java APIJava APIbooleanhttpOnly()scala.Option<Object>maxAge()name()static org.parboiled2.CharPredicatepair()Returns the name/value pair for this cookie, to be used inCookieheaders.scala.Option<String>path()static org.parboiled2.CharPredicateintproductElement(int n) static org.parboiled2.CharPredicaterender(R r) scala.Option<SameSite>sameSite()booleansecure()value()static org.parboiled2.CharPredicatehttp://tools.ietf.org/html/rfc6265#section-4.1.1 US-ASCII characters excluding CTLs, whitespace DQUOTE, comma, semicolon, and backslashwithDomain(String domain) Returns a copy of this HttpCookie instance with the given domain set.withExpires(DateTime dateTime) Java APIwithExpires(DateTime dateTime) Scala APIwithExtension(String extension) Returns a copy of this HttpCookie instance with the given extension set.withHttpOnly(boolean httpOnly) Returns a copy of this HttpCookie instance with the given http-only flag set.withMaxAge(long maxAge) Returns a copy of this HttpCookie instance with the given max age set.Returns a copy of this HttpCookie instance with the given path set.withSameSite(Optional<SameSite> sameSite) Returns a copy of this HttpCookie instance with the given OptionalSameSiteset.withSameSite(SameSite sameSite) Java APIwithSameSite(SameSite sameSite) Scala APIwithSameSite(scala.Option<SameSite> sameSite) withSecure(boolean secure) Returns a copy of this HttpCookie instance with the given secure flag set.Methods inherited from class org.apache.pekko.http.javadsl.model.headers.HttpCookie
create, create, createMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface scala.Product
productElementName, productElementNames, productIterator, productPrefixMethods inherited from interface org.apache.pekko.http.impl.util.ToStringRenderable
toString
-
Constructor Details
-
HttpCookie
-
-
Method Details
-
apply
public static HttpCookie apply(String name, String value, scala.Option<DateTime> expires, scala.Option<Object> maxAge, scala.Option<String> domain, scala.Option<String> path, boolean secure, boolean httpOnly, scala.Option<String> extension) You are encouraged to provide only 'name' and 'value' here, and use 'withXxx' methods to populate other fields.- Parameters:
name- (undocumented)value- (undocumented)expires- (undocumented)maxAge- (undocumented)domain- (undocumented)path- (undocumented)secure- (undocumented)httpOnly- (undocumented)extension- (undocumented)- Returns:
- (undocumented)
-
nameChars
public static org.parboiled2.CharPredicate nameChars() -
valueChars
public static org.parboiled2.CharPredicate valueChars()http://tools.ietf.org/html/rfc6265#section-4.1.1 US-ASCII characters excluding CTLs, whitespace DQUOTE, comma, semicolon, and backslash- Returns:
- (undocumented)
-
rawValueChars
public static org.parboiled2.CharPredicate rawValueChars() -
domainChars
public static org.parboiled2.CharPredicate domainChars() -
pathOrExtChars
public static org.parboiled2.CharPredicate pathOrExtChars() -
name
- Specified by:
namein classHttpCookie
-
value
- Specified by:
valuein classHttpCookie
-
expires
-
maxAge
-
domain
-
path
-
secure
public boolean secure()- Specified by:
securein classHttpCookie
-
httpOnly
public boolean httpOnly()- Specified by:
httpOnlyin classHttpCookie
-
extension
-
sameSite
-
copy
-
productArity
public int productArity()- Specified by:
productArityin interfacescala.Product
-
productElement
- Specified by:
productElementin interfacescala.Product
-
canEqual
- Specified by:
canEqualin interfacescala.Equals
-
equals
-
pair
Returns the name/value pair for this cookie, to be used inCookieheaders.- Specified by:
pairin classHttpCookie
-
render
- Specified by:
renderin interfaceRenderable
-
getSameSite
Java API- Specified by:
getSameSitein classHttpCookie
-
getExtension
Java API- Specified by:
getExtensionin classHttpCookie
-
getPath
Java API- Specified by:
getPathin classHttpCookie
-
getDomain
Java API- Specified by:
getDomainin classHttpCookie
-
getMaxAge
Java API- Specified by:
getMaxAgein classHttpCookie
-
getExpires
Java API- Specified by:
getExpiresin classHttpCookie
-
withName
-
withValue
-
withExpires
Scala API -
withExpires
Java API- Specified by:
withExpiresin classHttpCookie
-
withDomain
Description copied from class:HttpCookieReturns a copy of this HttpCookie instance with the given domain set.- Specified by:
withDomainin classHttpCookie
-
withPath
Description copied from class:HttpCookieReturns a copy of this HttpCookie instance with the given path set.- Specified by:
withPathin classHttpCookie
-
withMaxAge
Description copied from class:HttpCookieReturns a copy of this HttpCookie instance with the given max age set.- Specified by:
withMaxAgein classHttpCookie
-
withSecure
Description copied from class:HttpCookieReturns a copy of this HttpCookie instance with the given secure flag set.- Specified by:
withSecurein classHttpCookie
-
withHttpOnly
Description copied from class:HttpCookieReturns a copy of this HttpCookie instance with the given http-only flag set.- Specified by:
withHttpOnlyin classHttpCookie
-
withSameSite
Scala API -
withSameSite
-
withSameSite
Java API- Specified by:
withSameSitein classHttpCookie
-
withSameSite
Description copied from class:HttpCookieReturns a copy of this HttpCookie instance with the given OptionalSameSiteset.- Specified by:
withSameSitein classHttpCookie
-
withExtension
Description copied from class:HttpCookieReturns a copy of this HttpCookie instance with the given extension set.- Specified by:
withExtensionin classHttpCookie
-