- java.lang.Object
-
- io.helidon.common.http.SetCookie
-
public class SetCookie extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSetCookie.BuilderA fluent API builder forSetCookie.static classSetCookie.SameSiteThe SameSite attribute of the Set-Cookie HTTP response header allows you to declare if your cookie should be restricted to a first-party or same-site context.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SetCookie.Builderbuilder(String name, String value)Creates a new fluent API builder.static SetCookiecreate(String name, String value)Creates new instance.Stringname()Gets cookie's name.static SetCookieparse(String setCookie)Parses new instance ofSetCookiefrom the String representation.StringtoString()Returns content of this instance as a 'Set-Cookie:' header value specified by RFC6265.
-
-
-
Method Detail
-
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 ofSetCookiefrom 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
-
-