Class WebClientSession


  • public class WebClientSession
    extends WebClient
    An asynchronous sessions aware HTTP / HTTP/2 client called WebClientSession.

    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

    NOTE: This class has been automatically generated from the original non Mutiny-ified interface using Vert.x codegen.

    • 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 class WebClient
      • 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 name
        value - 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 instance
        cookieStore -
        Returns:
        the created client
      • addHeader

        public WebClientSession addHeader​(CharSequence name,
                                          CharSequence value)
        Parameters:
        name - the header name
        value - 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 name
        values - 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)