public interface WebClientSession extends WebClient
WebClientSession
.
This client wraps a WebClient
and makes it session aware adding features to it:
The client honors the cookies attributes:
Modifier and Type | Method and Description |
---|---|
WebClientSession |
addHeader(CharSequence name,
CharSequence value)
Configure the client to add an HTTP header to every request.
|
WebClientSession |
addHeader(CharSequence name,
Iterable<CharSequence> values)
Configure the client to add an HTTP header to every request.
|
WebClientSession |
addHeader(String name,
Iterable<String> values)
Configure the client to add an HTTP header to every request.
|
WebClientSession |
addHeader(String name,
String value)
Configure the client to add an HTTP header to every request.
|
CookieStore |
cookieStore()
Returns this client's
CookieStore |
static WebClientSession |
create(WebClient webClient)
Create a session aware web client using the provided
webClient instance. |
static WebClientSession |
create(WebClient webClient,
CookieStore cookieStore)
Create a session aware web client using the provided
webClient instance. |
WebClientSession |
removeHeader(CharSequence name)
Removes a previously added header.
|
WebClientSession |
removeHeader(String name)
Removes a previously added header.
|
close, create, create, delete, delete, delete, deleteAbs, get, get, get, getAbs, head, head, head, headAbs, patch, patch, patch, patchAbs, post, post, post, postAbs, put, put, put, putAbs, raw, raw, raw, rawAbs, request, request, request, request, request, request, request, request, requestAbs, requestAbs, wrap, wrap
static WebClientSession create(WebClient webClient)
webClient
instance.webClient
- the web client instancestatic WebClientSession create(WebClient webClient, CookieStore cookieStore)
webClient
instance.webClient
- the web client instanceWebClientSession addHeader(CharSequence name, CharSequence value)
name
- the header namevalue
- the header valueWebClientSession addHeader(String name, String value)
name
- the header namevalue
- the header valueWebClientSession addHeader(CharSequence name, Iterable<CharSequence> values)
name
- the header namevalues
- the header valueWebClientSession addHeader(String name, Iterable<String> values)
name
- the header namevalues
- the header valueWebClientSession removeHeader(CharSequence name)
name
- the header nameWebClientSession removeHeader(String name)
name
- the header nameCookieStore cookieStore()
CookieStore
All cookies added to this store will be send with every request. The CookieStore honors the domain, path, secure and max-age properties of received cookies and is automatically updated with cookies present in responses received by this client.
Copyright © 2023 Eclipse. All rights reserved.