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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncookie(String name, Function<HttpCookiePair, Route> inner) Extracts theHttpCookiePairwith the given name.deleteCookie(Iterable<HttpCookie> cookies, Supplier<Route> inner) Adds aSet-Cookieresponse header expiring the given cookies.Adds aSet-Cookieresponse header expiring the cookie with the given properties.deleteCookie(String name, String domain, Supplier<Route> inner) Adds aSet-Cookieresponse header expiring the cookie with the given properties.deleteCookie(String name, Supplier<Route> inner) Adds aSet-Cookieresponse header expiring the cookie with the given properties.deleteCookie(HttpCookie cookie, Supplier<Route> inner) Adds aSet-Cookieresponse 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 aSet-Cookieresponse header with the given cookies.setCookie(HttpCookie cookie, Supplier<Route> inner) Adds aSet-Cookieresponse header with the given cookie.Methods inherited from class org.apache.pekko.http.javadsl.server.directives.CodingDirectives
decodeRequest, decodeRequestWith, decodeRequestWith, encodeResponse, encodeResponseWith, requestEncodedWith, responseEncodingAccepted, withPrecompressedMediaTypeSupportMethods inherited from class org.apache.pekko.http.javadsl.server.directives.CacheConditionDirectives
conditional, conditional, conditional, conditionalMethods inherited from class org.apache.pekko.http.javadsl.server.directives.BasicDirectives
cancelRejection, 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
-
CookieDirectives
public CookieDirectives()
-
-
Method Details
-
cookie
Extracts 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)
-
deleteCookie
Adds aSet-Cookieresponse header expiring the given cookie.- Parameters:
cookie- (undocumented)inner- (undocumented)- Returns:
- (undocumented)
-
deleteCookie
Adds aSet-Cookieresponse header expiring the given cookies.- Parameters:
cookies- (undocumented)inner- (undocumented)- Returns:
- (undocumented)
-
deleteCookie
Adds aSet-Cookieresponse header expiring the cookie with the given properties.- Parameters:
name- Name of the cookie to matchinner- (undocumented)- Returns:
- (undocumented)
-
deleteCookie
Adds aSet-Cookieresponse header expiring the cookie with the given properties.- Parameters:
name- Name of the cookie to matchdomain- Domain of the cookie to match, or empty string to match any domaininner- (undocumented)- Returns:
- (undocumented)
-
deleteCookie
Adds aSet-Cookieresponse header expiring the cookie with the given properties.- Parameters:
name- Name of the cookie to matchdomain- Domain of the cookie to match, or empty string to match any domainpath- Path of the cookie to match, or empty string to match any pathinner- (undocumented)- Returns:
- (undocumented)
-
optionalCookie
Extracts theHttpCookiePairwith the given name as anOption[HttpCookiePair]. If the cookie is not present a value ofNoneis extracted.- Parameters:
name- (undocumented)inner- (undocumented)- Returns:
- (undocumented)
-
setCookie
Adds aSet-Cookieresponse header with the given cookie.- Parameters:
cookie- (undocumented)inner- (undocumented)- Returns:
- (undocumented)
-
setCookie
Adds aSet-Cookieresponse header with the given cookies.- Parameters:
cookies- (undocumented)inner- (undocumented)- Returns:
- (undocumented)
-