Class CookieDirectives
java.lang.Object
org.apache.pekko.http.javadsl.server.directives.BasicDirectives
org.apache.pekko.http.javadsl.server.directives.CacheConditionDirectives
org.apache.pekko.http.javadsl.server.directives.CodingDirectives
org.apache.pekko.http.javadsl.server.directives.CookieDirectives
- Direct Known Subclasses:
- DebuggingDirectives
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncookie(String name, Function<HttpCookiePair, Route> inner) Extracts theHttpCookiePairwith the given name.deleteCookie(Iterable<HttpCookie> cookies, Supplier<Route> inner) Adds a {@link Set-Cookie} response header expiring the given cookies.Adds a {@link Set-Cookie} response header expiring the cookie with the given properties.deleteCookie(String name, String domain, Supplier<Route> inner) Adds a {@link Set-Cookie} response header expiring the cookie with the given properties.deleteCookie(String name, Supplier<Route> inner) Adds a {@link Set-Cookie} response header expiring the cookie with the given properties.deleteCookie(HttpCookie cookie, Supplier<Route> inner) Adds a {@link Set-Cookie} response header expiring the given cookie.optionalCookie(String name, Function<Optional<HttpCookiePair>, Route> inner) Extracts theHttpCookiePairwith the given name as anOption[HttpCookiePair].setCookie(Iterable<HttpCookie> cookies, Supplier<Route> inner) Adds a {@link Set-Cookie} response header with the given cookies.setCookie(HttpCookie cookie, Supplier<Route> inner) Adds a {@link Set-Cookie} response header with the given cookie.Methods inherited from class org.apache.pekko.http.javadsl.server.directives.CodingDirectivesdecodeRequest, decodeRequestWith, decodeRequestWith, encodeResponse, encodeResponseWith, requestEncodedWith, responseEncodingAccepted, withPrecompressedMediaTypeSupportMethods inherited from class org.apache.pekko.http.javadsl.server.directives.CacheConditionDirectivesconditional, conditional, conditional, conditionalMethods inherited from class org.apache.pekko.http.javadsl.server.directives.BasicDirectivescancelRejection, cancelRejections, cancelRejections, extract, extractActorSystem, extractDataBytes, extractEntity, extractExecutionContext, extractLog, extractMatchedPath, extractMaterializer, extractParserSettings, extractRequest, extractRequestContext, extractRequestEntity, extractSettings, extractStrictEntity, extractStrictEntity, extractStrictEntity, extractStrictEntity, extractUnmatchedPath, extractUri, mapInnerRoute, mapRejections, mapRequest, mapRequestContext, mapResponse, mapResponseEntity, mapResponseHeaders, mapRouteResult, mapRouteResultFuture, mapRouteResultPF, mapRouteResultWith, mapRouteResultWithPF, mapSettings, mapUnmatchedPath, pass, provide, recoverRejections, recoverRejectionsWith, toStrictEntity, toStrictEntity, toStrictEntity, toStrictEntity, withExecutionContext, withLog, withMaterializer, withSettings
- 
Constructor Details- 
CookieDirectivespublic CookieDirectives()
 
- 
- 
Method Details- 
cookieExtracts theHttpCookiePairwith the given name. If the cookie is not present the request is rejected with a respectivepekko.http.javadsl.server.MissingCookieRejection.- Parameters:
- name- (undocumented)
- inner- (undocumented)
- Returns:
- (undocumented)
 
- 
deleteCookieAdds a {@link Set-Cookie} response header expiring the given cookie.- Parameters:
- cookie- (undocumented)
- inner- (undocumented)
- Returns:
- (undocumented)
 
- 
deleteCookieAdds a {@link Set-Cookie} response header expiring the given cookies.- Parameters:
- cookies- (undocumented)
- inner- (undocumented)
- Returns:
- (undocumented)
 
- 
deleteCookieAdds a {@link Set-Cookie} response header expiring the cookie with the given properties.- Parameters:
- name- Name of the cookie to match
- inner- (undocumented)
- Returns:
- (undocumented)
 
- 
deleteCookieAdds a {@link Set-Cookie} response header expiring the cookie with the given properties.- Parameters:
- name- Name of the cookie to match
- domain- Domain of the cookie to match, or empty string to match any domain
- inner- (undocumented)
- Returns:
- (undocumented)
 
- 
deleteCookieAdds a {@link Set-Cookie} response header expiring the cookie with the given properties.- Parameters:
- name- Name of the cookie to match
- domain- Domain of the cookie to match, or empty string to match any domain
- path- Path of the cookie to match, or empty string to match any path
- inner- (undocumented)
- Returns:
- (undocumented)
 
- 
optionalCookieExtracts theHttpCookiePairwith the given name as anOption[HttpCookiePair]. If the cookie is not present a value ofNoneis extracted.- Parameters:
- name- (undocumented)
- inner- (undocumented)
- Returns:
- (undocumented)
 
- 
setCookieAdds a {@link Set-Cookie} response header with the given cookie.- Parameters:
- cookie- (undocumented)
- inner- (undocumented)
- Returns:
- (undocumented)
 
- 
setCookieAdds a {@link Set-Cookie} response header with the given cookies.- Parameters:
- cookies- (undocumented)
- inner- (undocumented)
- Returns:
- (undocumented)
 
 
-