Class Cookies
java.lang.Object
ru.tinkoff.kora.http.common.cookie.Cookies
Class that contains utility methods for dealing with cookies.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidparseRequestCookies(int maxCookies, boolean allowEqualInValue, List<String> cookies, Collection<Cookie> parsedCookies) /** Parses the cookies from a list of "Cookie:" header values.static CookieparseSetCookieHeader(String headerValue) Parses a "Set-Cookie:" response header value into its cookie representation.
-
Field Details
-
DOMAIN
- See Also:
-
VERSION
- See Also:
-
PATH
- See Also:
-
-
Method Details
-
parseSetCookieHeader
Parses a "Set-Cookie:" response header value into its cookie representation. The header value is parsed according to the syntax that's defined in RFC2109:set-cookie = "Set-Cookie:" cookies cookies = 1#cookie cookie = NAME "=" VALUE *(";" cookie-av) NAME = attr VALUE = value cookie-av = "Comment" "=" value | "Domain" "=" value | "Max-Age" "=" value | "Path" "=" value | "Secure" | "Version" "=" 1*DIGIT -
parseRequestCookies
public static void parseRequestCookies(int maxCookies, boolean allowEqualInValue, @Nullable List<String> cookies, Collection<Cookie> parsedCookies) /** Parses the cookies from a list of "Cookie:" header values. The cookie header values are parsed according to RFC2109 that defines the following syntax:cookie = "Cookie:" cookie-version 1*((";" | ",") cookie-value) cookie-value = NAME "=" VALUE [";" path] [";" domain] cookie-version = "$Version" "=" value NAME = attr VALUE = value path = "$Path" "=" value domain = "$Domain" "=" value
-