Class SetCookie


  • public class SetCookie
    extends Object
    Represents 'Set-Cookie' header value specified by RFC6265.

    It is mutable and fluent builder.

    • Method Detail

      • builder

        public static SetCookie.Builder builder​(String name,
                                                String value)
        Creates a new fluent API builder.
        Parameters:
        name - a cookie name.
        value - a cookie value.
        Returns:
        a new fluent API builder
      • create

        public static SetCookie create​(String name,
                                       String value)
        Creates new instance.
        Parameters:
        name - a cookie name.
        value - a cookie value.
        Returns:
        a new instance with just the name and value configured
      • toString

        public String toString()
        Returns content of this instance as a 'Set-Cookie:' header value specified by RFC6265.
        Overrides:
        toString in class Object
        Returns:
        a 'Set-Cookie:' header value.