java.lang.Object
java.net.CookieHandler
java.net.CookieManager
io.helidon.webclient.api.WebClientCookieManager
- All Implemented Interfaces:
RuntimeType.Api<WebClientCookieManagerConfig>
public class WebClientCookieManager
extends CookieManager
implements RuntimeType.Api<WebClientCookieManagerConfig>
Helidon WebClient cookie manager.
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
A new builder to create a customized cookie manager.static WebClientCookieManager
create
(WebClientCookieManagerConfig config) Create a cookie manager from its configuration.static WebClientCookieManager
create
(Consumer<WebClientCookieManagerConfig.Builder> configConsumer) Create a cookie manager updating its configuration.The prototype as it was received when creating this runtime object instance.void
void
request
(ClientUri uri, ClientRequestHeaders requestHeaders) Add stored cookies to request headers.void
response
(ClientUri uri, ClientResponseHeaders headers) Store cookies from response headers.Methods inherited from class java.net.CookieManager
getCookieStore, setCookiePolicy
Methods inherited from class java.net.CookieHandler
getDefault, setDefault
-
Method Details
-
create
Create a cookie manager from its configuration.- Parameters:
config
- configuration of the manager- Returns:
- a new manager
-
create
public static WebClientCookieManager create(Consumer<WebClientCookieManagerConfig.Builder> configConsumer) Create a cookie manager updating its configuration.- Parameters:
configConsumer
- consumer to update manager configuration- Returns:
- a new manager
-
builder
A new builder to create a customized cookie manager.- Returns:
- cookie manager
-
prototype
Description copied from interface:RuntimeType.Api
The prototype as it was received when creating this runtime object instance.- Specified by:
prototype
in interfaceRuntimeType.Api<WebClientCookieManagerConfig>
- Returns:
- prototype object used to create this instance
-
get
public Map<String,List<String>> get(URI uri, Map<String, List<String>> requestHeaders) throws IOException- Overrides:
get
in classCookieManager
- Throws:
IOException
-
put
- Overrides:
put
in classCookieManager
- Throws:
IOException
-
request
Add stored cookies to request headers.See
get(java.net.URI, java.util.Map<java.lang.String, java.util.List<java.lang.String>>)
.- Parameters:
uri
- the urirequestHeaders
- client request headers
-
response
Store cookies from response headers.See
put(java.net.URI, java.util.Map<java.lang.String, java.util.List<java.lang.String>>)
.- Parameters:
uri
- the uriheaders
- client response headers
-