Package io.micronaut.http.cookie
Interface ClientCookieEncoder
- All Known Implementing Classes:
DefaultClientCookieEncoder
,NettyLaxClientCookieEncoder
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Encodes a
Cookie
into a String. Typically used to set the HttpHeaders.COOKIE
value for example in an HTTP Client.
The cookie gets serialized by concatenating the cookie's name, the %x3D ("=") character, and the cookie's value.- Since:
- 4.3.0
- Author:
- Sergio del Amo
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ClientCookieEncoder
The defaultServerCookieEncoder
instance. -
Method Summary
-
Field Details
-
INSTANCE
The defaultServerCookieEncoder
instance.
-
-
Method Details
-
encode
Encodes aCookie
into a String. Typically used to set theHttpHeaders.COOKIE
value for example in an HTTP Client. The cookie gets serialized by concatenating the cookie's name, the %x3D ("=") character, and the cookie's value.- Parameters:
cookie
- Cookie to encode- Returns:
- The cookie serialized into a string by concatenating the cookie's name, the %x3D ("=") character, and the cookie's value.
- See Also:
-