public interface RequestCookies
Represents the cookies of a client request in a server exchange.
- Since:
- 1.0
- Author:
- Jeremy Kuhn
- See Also:
Request
-
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines whether a cookie with the specified name is present.Returns the cookie with the specified name.getAll()Returns all cookies sent in the request.Returns all cookies with the specified name.getNames()Returns the names of the cookies sent in the request.
-
Method Details
-
contains
Determines whether a cookie with the specified name is present.
- Parameters:
name- a cookie name- Returns:
- true if a cookie is present, false otherwise
-
getNames
Returns the names of the cookies sent in the request.
- Returns:
- a list of cookie names
-
get
Returns the cookie with the specified name.
If there are multiple cookies with the same name, this method returns the first one.
- Parameters:
name- a cookie name- Returns:
- an optional returning the cookie parameter or an empty optional if there's no cookie with the specified name
-
getAll
Returns all cookies with the specified name.
- Parameters:
name- a cookie name- Returns:
- a list of cookie parameters or an empty list if there's no cookie with the specified name
-
getAll
Map<String,List<CookieParameter>> getAll()Returns all cookies sent in the request.
- Returns:
- the cookies grouped by name
-