Class SetCookie

java.lang.Object
io.helidon.common.http.SetCookie

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

It is mutable and fluent builder.

  • Method Details

    • name

      public String name()
      Gets cookie's name.
      Returns:
      the name.
    • 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
    • parse

      public static SetCookie parse(String setCookie)
      Parses new instance of SetCookie from the String representation.
      Parameters:
      setCookie - string representation
      Returns:
      new instance
    • 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.