Package io.vertx.mutiny.ext.web.client
Class WebClientSession
- java.lang.Object
-
- io.vertx.mutiny.ext.web.client.WebClient
-
- io.vertx.mutiny.ext.web.client.WebClientSession
-
public class WebClientSession extends WebClient
An asynchronous sessions aware HTTP / HTTP/2 client calledWebClientSession
.This client wraps a
WebClient
and makes it session aware adding features to it:- Per client headers, to be send with every request
- Per client cookies, to be send with every request
- Automatic storage and sending of cookies received from the server(s)
The client honors the cookies attributes:
- domain
- path
- secure
- max-age and expires
original
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<WebClientSession>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description WebClientSession(io.vertx.ext.web.client.WebClientSession delegate)
WebClientSession(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WebClientSession
addHeader(CharSequence name, CharSequence value)
WebClientSession
addHeader(CharSequence name, Iterable<CharSequence> values)
WebClientSession
addHeader(String name, Iterable<String> values)
WebClientSession
addHeader(String name, String value)
io.vertx.ext.web.client.spi.CookieStore
cookieStore()
static WebClientSession
create(WebClient webClient)
static WebClientSession
create(WebClient webClient, io.vertx.ext.web.client.spi.CookieStore cookieStore)
boolean
equals(Object o)
io.vertx.ext.web.client.WebClientSession
getDelegate()
int
hashCode()
static WebClientSession
newInstance(io.vertx.ext.web.client.WebClientSession arg)
WebClientSession
removeHeader(CharSequence name)
WebClientSession
removeHeader(String name)
String
toString()
-
Methods inherited from class io.vertx.mutiny.ext.web.client.WebClient
close, create, create, delete, delete, delete, delete, delete, delete, deleteAbs, deleteAbs, get, get, get, get, get, get, getAbs, getAbs, head, head, head, head, head, head, headAbs, headAbs, newInstance, patch, patch, patch, patch, patch, patch, patchAbs, patchAbs, post, post, post, post, post, post, postAbs, postAbs, put, put, put, put, put, put, putAbs, putAbs, request, request, request, request, request, request, request, request, request, request, request, request, request, request, requestAbs, requestAbs, requestAbs, requestAbs, updateSSLOptions, updateSSLOptions, updateSSLOptionsAndAwait, updateSSLOptionsAndAwait, updateSSLOptionsAndForget, updateSSLOptionsAndForget, wrap, wrap
-
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<WebClientSession> __TYPE_ARG
-
-
Constructor Detail
-
WebClientSession
public WebClientSession(io.vertx.ext.web.client.WebClientSession delegate)
-
WebClientSession
public WebClientSession(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.ext.web.client.WebClientSession getDelegate()
- Overrides:
getDelegate
in classWebClient
-
create
public static WebClientSession create(WebClient webClient)
- Parameters:
webClient
- the web client instance- Returns:
- the created client
-
addHeader
public WebClientSession addHeader(String name, String value)
- Parameters:
name
- the header namevalue
- the header value- Returns:
- a reference to this, so the API can be used fluently
-
removeHeader
public WebClientSession removeHeader(String name)
- Parameters:
name
- the header name- Returns:
- a reference to this, so the API can be used fluently
-
create
public static WebClientSession create(WebClient webClient, io.vertx.ext.web.client.spi.CookieStore cookieStore)
- Parameters:
webClient
- the web client instancecookieStore
-- Returns:
- the created client
-
addHeader
public WebClientSession addHeader(CharSequence name, CharSequence value)
- Parameters:
name
- the header namevalue
- the header value- Returns:
- a reference to this, so the API can be used fluently
-
addHeader
public WebClientSession addHeader(CharSequence name, Iterable<CharSequence> values)
- Parameters:
name
- the header namevalues
- the header value- Returns:
- a reference to this, so the API can be used fluently
-
addHeader
public WebClientSession addHeader(String name, Iterable<String> values)
- Parameters:
name
- the header namevalues
- the header value- Returns:
- a reference to this, so the API can be used fluently
-
removeHeader
public WebClientSession removeHeader(CharSequence name)
- Parameters:
name
- the header name- Returns:
- a reference to this, so the API can be used fluently
-
cookieStore
public io.vertx.ext.web.client.spi.CookieStore cookieStore()
- Returns:
- this client's cookie store
-
newInstance
public static WebClientSession newInstance(io.vertx.ext.web.client.WebClientSession arg)
-
-