Class Cookie

java.lang.Object
org.miaixz.bus.http.Cookie

public class Cookie extends Object
Cookie's相关工具支持 这个类不支持cookies上的附加属性,比如Chromium的Priority=HIGH extension
Since:
Java 17+
Author:
Kimi Liu
  • Method Details

    • parse

      public static Cookie parse(UnoUrl url, String setCookie)
    • parseAll

      public static List<Cookie> parseAll(UnoUrl url, Headers headers)
      Returns all of the cookies from a set of HTTP response headers.
    • name

      public String name()
    • value

      public String value()
    • persistent

      public boolean persistent()
    • expiresAt

      public long expiresAt()
    • hostOnly

      public boolean hostOnly()
    • domain

      public String domain()
    • path

      public String path()
    • httpOnly

      public boolean httpOnly()
    • secure

      public boolean secure()
    • matches

      public boolean matches(UnoUrl url)
      Returns true if this cookie should be included on a request to url. In addition to this check callers should also confirm that this cookie has not expired.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object