public final class RsWithCookie extends RsWrap
Use this decorator in order to return a response with a "Set-Cookie" header inside, for example:
return new RsWithCookie( new RsText("hello, world!"), "u", "Jeff", "Path=/", "Expires=Wed, 13 Jan 2021 22:23:01 GMT" );
This response will contain this header:
Set-Cookie: u=Jeff;Path=/;Expires=Wed, 13 Jan 2021 22:23:01 GMT
The class is immutable and thread-safe.
Constructor and Description |
---|
RsWithCookie(Response res,
String name,
String value,
String... attrs)
Ctor.
|
RsWithCookie(String name,
String value,
String... attrs)
Ctor.
|
Copyright © 2015 Take. All rights reserved.