Class CookieDirectives
java.lang.Object
akka.http.javadsl.server.directives.BasicDirectives
akka.http.javadsl.server.directives.CacheConditionDirectives
akka.http.javadsl.server.directives.CodingDirectives
akka.http.javadsl.server.directives.CookieDirectives
- Direct Known Subclasses:
DebuggingDirectives
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncookie
(String name, Function<HttpCookiePair, Route> inner) Extracts theHttpCookiePair
with the given name.deleteCookie
(HttpCookie cookie, Supplier<Route> inner) Adds a {@link Set-Cookie} response header expiring the given cookie.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.optionalCookie
(String name, Function<Optional<HttpCookiePair>, Route> inner) Extracts theHttpCookiePair
with the given name as anOption[HttpCookiePair]
.setCookie
(HttpCookie cookie, Supplier<Route> inner) Adds a {@link Set-Cookie} response header with the given cookie.setCookie
(Iterable<HttpCookie> cookies, Supplier<Route> inner) Adds a {@link Set-Cookie} response header with the given cookies.Methods inherited from class akka.http.javadsl.server.directives.CodingDirectives
decodeRequest, decodeRequestWith, decodeRequestWith, encodeResponse, encodeResponseWith, requestEncodedWith, responseEncodingAccepted, withPrecompressedMediaTypeSupport
Methods inherited from class akka.http.javadsl.server.directives.CacheConditionDirectives
conditional, conditional, conditional, conditional
Methods inherited from class akka.http.javadsl.server.directives.BasicDirectives
cancelRejection, cancelRejections, cancelRejections, extract, extractActorSystem, extractDataBytes, extractEntity, extractExecutionContext, extractLog, extractMatchedPath, extractMaterializer, extractParserSettings, extractRequest, extractRequestContext, extractRequestEntity, extractSettings, extractStrictEntity, extractStrictEntity, extractUnmatchedPath, extractUri, mapInnerRoute, mapRejections, mapRequest, mapRequestContext, mapResponse, mapResponseEntity, mapResponseHeaders, mapRouteResult, mapRouteResultFuture, mapRouteResultPF, mapRouteResultWith, mapRouteResultWithPF, mapSettings, mapUnmatchedPath, pass, provide, recoverRejections, recoverRejectionsWith, toStrictEntity, toStrictEntity, withExecutionContext, withLog, withMaterializer, withSettings
-
Constructor Details
-
CookieDirectives
public CookieDirectives()
-
-
Method Details
-
cookie
Extracts theHttpCookiePair
with the given name. If the cookie is not present the request is rejected with a respectiveMissingCookieRejection
.- Parameters:
name
- (undocumented)inner
- (undocumented)- Returns:
- (undocumented)
-
deleteCookie
Adds a {@link Set-Cookie} response header expiring the given cookie.- Parameters:
cookie
- (undocumented)inner
- (undocumented)- Returns:
- (undocumented)
-
deleteCookie
Adds a {@link Set-Cookie} response header expiring the given cookies.- Parameters:
cookies
- (undocumented)inner
- (undocumented)- Returns:
- (undocumented)
-
deleteCookie
Adds a {@link Set-Cookie} response header expiring the cookie with the given properties.- Parameters:
name
- Name of the cookie to matchinner
- (undocumented)- Returns:
- (undocumented)
-
deleteCookie
Adds a {@link Set-Cookie} response 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 a {@link Set-Cookie} response 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 theHttpCookiePair
with the given name as anOption[HttpCookiePair]
. If the cookie is not present a value ofNone
is extracted.- Parameters:
name
- (undocumented)inner
- (undocumented)- Returns:
- (undocumented)
-
setCookie
Adds a {@link Set-Cookie} response header with the given cookie.- Parameters:
cookie
- (undocumented)inner
- (undocumented)- Returns:
- (undocumented)
-
setCookie
Adds a {@link Set-Cookie} response header with the given cookies.- Parameters:
cookies
- (undocumented)inner
- (undocumented)- Returns:
- (undocumented)
-