Interface InboundSetCookies

All Known Subinterfaces:
OutboundSetCookies

public interface InboundSetCookies

Represents immutable inbound HTTP set-cookies.

Inbound set-cookies are recevieved by a client in a response in a client exchange.

Since:
1.6
Author:
Jeremy Kuhn
See Also:
  • Method Details

    • contains

      boolean contains(String name)

      Determines whether a set-cookie with the specified name is present.

      Parameters:
      name - a set-cookie name
      Returns:
      true if a set-cookie is present, false otherwise
    • getNames

      Set<String> getNames()

      Returns the names of the set-cookies sent in the request.

      Returns the names of the set-cookies.

      Returns:
      a list of set-cookie names
    • get

      Returns the set-cookie with the specified name.

      If there are multiple set-cookies with the same name, this method returns the first one.

      Parameters:
      name - a set-cookie name
      Returns:
      an optional returning the set-cookie parameter or an empty optional if there's no set-cookie with the specified name
    • getAll

      Returns all set-cookies with the specified name.

      Parameters:
      name - a set-cookie name
      Returns:
      a list of set-cookie parameters or an empty list if there's no set-cookie with the specified name
    • getAll

      Returns all set-cookies.

      Returns:
      the set-cookies grouped by name