Interface RequestCookies


public interface RequestCookies

Represents the cookies of a client request in a server exchange.

Since:
1.0
Author:
Jeremy Kuhn
See Also:
Request
  • Method Details

    • contains

      boolean contains(String name)

      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

      Set<String> 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

      List<CookieParameter> getAll(String name)

      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

      Returns all cookies sent in the request.

      Returns:
      the cookies grouped by name