Package io.micronaut.http.cookie
Class CookieUtils
java.lang.Object
io.micronaut.http.cookie.CookieUtils
Utils class to work with cookies.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetCookieHeader(@NonNull MutableHttpHeaders headers, @NonNull Cookie cookie) Sets the HTTP Header Set-Cookie with the supplied cookie encoded.static voidsetCookieHeader(@NonNull MutableHttpHeaders headers, @NonNull Cookie cookie, @NonNull Integer cookieByteLimit) Sets the HTTP Header Set-Cookie with the supplied cookie encoded.static voidverifyCookieSize(@NonNull Cookie cookie, @NonNull String cookieEncoded) static voidverifyCookieSize(@NonNull Cookie cookie, @NonNull String cookieEncoded, @NonNull Integer cookieByteLimit)
-
Method Details
-
verifyCookieSize
public static void verifyCookieSize(@NonNull @NonNull Cookie cookie, @NonNull @NonNull String cookieEncoded) - Parameters:
cookie- CookiecookieEncoded- Encoded cookie
-
verifyCookieSize
public static void verifyCookieSize(@NonNull @NonNull Cookie cookie, @NonNull @NonNull String cookieEncoded, @NonNull @NonNull Integer cookieByteLimit) - Parameters:
cookie- CookiecookieEncoded- Encoded cookiecookieByteLimit- Cookie byte Limit
-
setCookieHeader
public static void setCookieHeader(@NonNull @NonNull MutableHttpHeaders headers, @NonNull @NonNull Cookie cookie, @NonNull @NonNull Integer cookieByteLimit) Sets the HTTP Header Set-Cookie with the supplied cookie encoded.- Parameters:
headers- HTTP Headerscookie- CookiecookieByteLimit- Cookie byte Limit
-
setCookieHeader
public static void setCookieHeader(@NonNull @NonNull MutableHttpHeaders headers, @NonNull @NonNull Cookie cookie) Sets the HTTP Header Set-Cookie with the supplied cookie encoded.- Parameters:
headers- HTTP Headerscookie- Cookie
-