Package | Description |
---|---|
io.muserver |
This package contains the main API of mu-server, for example the server builders, request and response objects.
|
Modifier and Type | Method and Description |
---|---|
static CookieBuilder |
Cookie.builder()
Creates a new cookie builder with secure, Strict SameSite and httpOnly selected.
|
CookieBuilder |
CookieBuilder.httpOnly(boolean httpOnly)
Instructs browsers on whether or not the cookie can be accessed via JavaScript.
|
CookieBuilder |
CookieBuilder.makeSessionCookie()
Makes this cookie expire when the browser session expires (which may be when the user closes their
browser).
|
static CookieBuilder |
CookieBuilder.newCookie()
Creates a new session cookie
|
static CookieBuilder |
CookieBuilder.newSecureCookie()
Creates a new session cookie that is only sent over HTTPS and cannot be accessed with JavaScript
with a Strict samesite policy applied.
|
CookieBuilder |
CookieBuilder.secure(boolean secure)
Instructs clients on whether or not cookies can be sent over non-secure (HTTP) connections.
|
CookieBuilder |
CookieBuilder.withDomain(String domain)
Sets the host that clients should send the cookie over.
|
CookieBuilder |
CookieBuilder.withMaxAgeInSeconds(long maxAge)
Specifies how long the cookie will last for.
|
CookieBuilder |
CookieBuilder.withName(String name)
Sets the name of the cookie.
|
CookieBuilder |
CookieBuilder.withPath(String path)
Sets the path prefix that the cookie will be sent with, or null to send to all paths.
|
CookieBuilder |
CookieBuilder.withSameSite(String sameSiteValue)
Sets the
SameSite property of the cookie. |
CookieBuilder |
CookieBuilder.withUrlEncodedValue(String value)
Sets the value of the cookie by URL Encoding the given value.
|
CookieBuilder |
CookieBuilder.withValue(String value)
Sets the value of the cookie.
|
Copyright © 2017–2021. All rights reserved.