Class IgnoreSpecSpec

  • All Implemented Interfaces:
    CookieSpec

    @Contract(threading=STATELESS)
    public class IgnoreSpecSpec
    extends CookieSpecBase
    CookieSpec that ignores all cookies
    Since:
    4.1
    • Field Detail

      • INSTANCE

        public static final IgnoreSpecSpec INSTANCE
        Singleton instance.
        Since:
        5.2
    • Constructor Detail

      • IgnoreSpecSpec

        public IgnoreSpecSpec()
    • Method Detail

      • match

        public boolean match​(Cookie cookie,
                             CookieOrigin origin)
        Description copied from interface: CookieSpec
        Determines if a Cookie matches the target location.
        Specified by:
        match in interface CookieSpec
        Overrides:
        match in class CookieSpecBase
        Parameters:
        cookie - the Cookie to be matched
        origin - the target to test against
        Returns:
        true if the cookie should be submitted with a request with given attributes, false otherwise.
      • formatCookies

        public java.util.List<org.apache.hc.core5.http.Header> formatCookies​(java.util.List<Cookie> cookies)
        Description copied from interface: CookieSpec
        Create "Cookie" headers for an array of Cookies.
        Parameters:
        cookies - the Cookies format into a Cookie header
        Returns:
        a Header for the given Cookies.