public class CookieHeader extends Header
Cookie request message header. For
more information, see the original Netscape specification, RFC 2109 and RFC 2965.
Note: This implementation is designed to be forgiving when parsing malformed cookies.
| Modifier and Type | Field and Description |
|---|---|
static String |
NAME
The name of this header.
|
| Constructor and Description |
|---|
CookieHeader()
Constructs a new empty header.
|
CookieHeader(List<Cookie> cookies)
Constructs a new header with the provided cookies.
|
| Modifier and Type | Method and Description |
|---|---|
List<Cookie> |
getCookies()
Returns the cookies' request list.
|
String |
getName()
Returns the name of the header, as it would canonically appear within an
HTTP message.
|
List<String> |
getValues()
Returns the header as a list of strings.
|
static CookieHeader |
valueOf(Request message)
Constructs a new header, initialized from the specified request message.
|
static CookieHeader |
valueOf(String string)
Constructs a new header, initialized from the specified string value.
|
equals, getFirstValue, hashCode, toStringpublic static final String NAME
public static CookieHeader valueOf(Request message)
message - The request message to initialize the header from.public static CookieHeader valueOf(String string)
string - The value to initialize the header from.public List<Cookie> getCookies()
public String getName()
Headerpublic List<String> getValues()
HeaderString should
represent the value component of the key-value pair that makes up the
HTTP header - as such, for some Header implementations each
String in this List may contain multiple token-separated values.
The List returned from this method should not be expected to be
mutable. However, some subclasses of Header may choose to
implement it as such.
Copyright © 2025 Open Identity Platform Community. All rights reserved.