Class HttpCookie

java.lang.Object
org.springframework.http.HttpCookie
Direct Known Subclasses:
ResponseCookie

public class HttpCookie extends Object
Represents an HTTP cookie as a name-value pair consistent with the content of the "Cookie" request header. The ResponseCookie sub-class has the additional attributes expected in the "Set-Cookie" response header.
Since:
5.0
Author:
Rossen Stoyanchev
See Also:
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Return the cookie name.
    • getValue

      public String getValue()
      Return the cookie value or an empty string (never null).
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object other)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object