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 SummaryConstructors
- 
Method SummaryModifier 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.HttpCookiecreate, create, createMethods inherited from class java.lang.Objectclone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface scala.ProductproductElementName, productElementNames, productIterator, productPrefixMethods inherited from interface org.apache.pekko.http.impl.util.ToStringRenderabletoString
- 
Constructor Details- 
HttpCookie
 
- 
- 
Method Details- 
applypublic 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)
 
- 
nameCharspublic static org.parboiled2.CharPredicate nameChars()
- 
valueCharspublic 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)
 
- 
rawValueCharspublic static org.parboiled2.CharPredicate rawValueChars()
- 
domainCharspublic static org.parboiled2.CharPredicate domainChars()
- 
pathOrExtCharspublic static org.parboiled2.CharPredicate pathOrExtChars()
- 
name- Specified by:
- namein class- HttpCookie
 
- 
value- Specified by:
- valuein class- HttpCookie
 
- 
expires
- 
maxAge
- 
domain
- 
path
- 
securepublic boolean secure()- Specified by:
- securein class- HttpCookie
 
- 
httpOnlypublic boolean httpOnly()- Specified by:
- httpOnlyin class- HttpCookie
 
- 
extension
- 
sameSite
- 
copy
- 
productAritypublic int productArity()- Specified by:
- productArityin interface- scala.Product
 
- 
productElement- Specified by:
- productElementin interface- scala.Product
 
- 
canEqual- Specified by:
- canEqualin interface- scala.Equals
 
- 
equals
- 
pairReturns the name/value pair for this cookie, to be used inCookieheaders.- Specified by:
- pairin class- HttpCookie
 
- 
render- Specified by:
- renderin interface- Renderable
 
- 
getSameSiteJava API- Specified by:
- getSameSitein class- HttpCookie
 
- 
getExtensionJava API- Specified by:
- getExtensionin class- HttpCookie
 
- 
getPathJava API- Specified by:
- getPathin class- HttpCookie
 
- 
getDomainJava API- Specified by:
- getDomainin class- HttpCookie
 
- 
getMaxAgeJava API- Specified by:
- getMaxAgein class- HttpCookie
 
- 
getExpiresJava API- Specified by:
- getExpiresin class- HttpCookie
 
- 
withName
- 
withValue
- 
withExpiresScala API
- 
withExpiresJava API- Specified by:
- withExpiresin class- HttpCookie
 
- 
withDomainDescription copied from class:HttpCookieReturns a copy of this HttpCookie instance with the given domain set.- Specified by:
- withDomainin class- HttpCookie
 
- 
withPathDescription copied from class:HttpCookieReturns a copy of this HttpCookie instance with the given path set.- Specified by:
- withPathin class- HttpCookie
 
- 
withMaxAgeDescription copied from class:HttpCookieReturns a copy of this HttpCookie instance with the given max age set.- Specified by:
- withMaxAgein class- HttpCookie
 
- 
withSecureDescription copied from class:HttpCookieReturns a copy of this HttpCookie instance with the given secure flag set.- Specified by:
- withSecurein class- HttpCookie
 
- 
withHttpOnlyDescription copied from class:HttpCookieReturns a copy of this HttpCookie instance with the given http-only flag set.- Specified by:
- withHttpOnlyin class- HttpCookie
 
- 
withSameSiteScala API
- 
withSameSite
- 
withSameSiteJava API- Specified by:
- withSameSitein class- HttpCookie
 
- 
withSameSiteDescription copied from class:HttpCookieReturns a copy of this HttpCookie instance with the given OptionalSameSiteset.- Specified by:
- withSameSitein class- HttpCookie
 
- 
withExtensionDescription copied from class:HttpCookieReturns a copy of this HttpCookie instance with the given extension set.- Specified by:
- withExtensionin class- HttpCookie
 
 
-