Package io.micronaut.http.cookie
Interface ServerCookieEncoder
- All Known Implementing Classes:
DefaultServerCookieEncoder
,NettyServerCookieEncoder
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
API to encode a
Cookie
in an HTTP Server.
The encoded string is typically used to set the value of the Set-Cookie header.- Since:
- 4.3.0
- Author:
- Sergio del Amo
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ServerCookieEncoder
The defaultServerCookieEncoder
instance. -
Method Summary
-
Field Details
-
INSTANCE
The defaultServerCookieEncoder
instance.
-
-
Method Details
-
encode
- Parameters:
cookies
- Cookies to encode- Returns:
- Returns a string representation for each supplied cookie. The string representation is typically used as the value of the
HttpHeaders.SET_COOKIE
header.
-