vertx-lang-scala-docs_2.12 3.4.1 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package ext
  Definition Classes
    scala
-  package web
  Definition Classes
    ext
-  package client
  Definition Classes
    web
- HttpRequest
- HttpResponse
- WebClient
- WebClientOptions

c

io.vertx.scala.ext.web.client

# WebClient 

###
Companion object WebClient

#### class WebClient extends AnyRef

An asynchronous HTTP / HTTP/2 client called `WebClient`.

The web client makes easy to do HTTP request/response interactions with a web server, and provides advanced features like:

- Json body encoding / decoding
- request/response pumping
- error handling

The web client does not deprecate the , it is actually based on it and therefore inherits its configuration and great features like pooling. The `HttpClient` should be used when fine grained control over the HTTP requests/response is necessary.

Linear Supertypes
AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. WebClient
2. AnyRef
3. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new WebClient(_asJava: AnyRef)

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
5.  def asJava: AnyRef
6.  def clone(): AnyRef
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @throws( ... )
7.  def close(): Unit

   Close the client.

   Close the client. Closing will close down any pooled connections. Clients should always be closed after use.

8.  def delete(host: String, requestURI: String): HttpRequest[Buffer]

   Create an HTTP DELETE request to send to the server at the specified host and default port.

   Create an HTTP DELETE request to send to the server at the specified host and default port.

   host

     the host

   requestURI

     the relative URI

   returns

     an HTTP client request object

9.  def delete(port: Int, host: String, requestURI: String): HttpRequest[Buffer]

   Create an HTTP DELETE request to send to the server at the specified host and port.

   Create an HTTP DELETE request to send to the server at the specified host and port.

   port

     the port

   host

     the host

   requestURI

     the relative URI

   returns

     an HTTP client request object

10.  def delete(requestURI: String): HttpRequest[Buffer]

    Create an HTTP DELETE request to send to the server at the default host and port.

    Create an HTTP DELETE request to send to the server at the default host and port.

    requestURI

      the relative URI

    returns

      an HTTP client request object

11.  def deleteAbs(absoluteURI: String): HttpRequest[Buffer]

    Create an HTTP DELETE request to send to the server using an absolute URI, specifying a response handler to receive the response

    Create an HTTP DELETE request to send to the server using an absolute URI, specifying a response handler to receive the response

    absoluteURI

      the absolute URI

    returns

      an HTTP client request object

12.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
13.  def equals(arg0: Any): Boolean
    Definition Classes
      AnyRef → Any
14.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
15.  def get(host: String, requestURI: String): HttpRequest[Buffer]

    Create an HTTP GET request to send to the server at the specified host and default port.

    Create an HTTP GET request to send to the server at the specified host and default port.

    host

      the host

    requestURI

      the relative URI

    returns

      an HTTP client request object

16.  def get(port: Int, host: String, requestURI: String): HttpRequest[Buffer]

    Create an HTTP GET request to send to the server at the specified host and port.

    Create an HTTP GET request to send to the server at the specified host and port.

    port

      the port

    host

      the host

    requestURI

      the relative URI

    returns

      an HTTP client request object

17.  def get(requestURI: String): HttpRequest[Buffer]

    Create an HTTP GET request to send to the server at the default host and port.

    Create an HTTP GET request to send to the server at the default host and port.

    requestURI

      the relative URI

    returns

      an HTTP client request object

18.  def getAbs(absoluteURI: String): HttpRequest[Buffer]

    Create an HTTP GET request to send to the server using an absolute URI, specifying a response handler to receive the response

    Create an HTTP GET request to send to the server using an absolute URI, specifying a response handler to receive the response

    absoluteURI

      the absolute URI

    returns

      an HTTP client request object

19.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
20.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
21.  def head(host: String, requestURI: String): HttpRequest[Buffer]

    Create an HTTP HEAD request to send to the server at the specified host and default port.

    Create an HTTP HEAD request to send to the server at the specified host and default port.

    host

      the host

    requestURI

      the relative URI

    returns

      an HTTP client request object

22.  def head(port: Int, host: String, requestURI: String): HttpRequest[Buffer]

    Create an HTTP HEAD request to send to the server at the specified host and port.

    Create an HTTP HEAD request to send to the server at the specified host and port.

    port

      the port

    host

      the host

    requestURI

      the relative URI

    returns

      an HTTP client request object

23.  def head(requestURI: String): HttpRequest[Buffer]

    Create an HTTP HEAD request to send to the server at the default host and port.

    Create an HTTP HEAD request to send to the server at the default host and port.

    requestURI

      the relative URI

    returns

      an HTTP client request object

24.  def headAbs(absoluteURI: String): HttpRequest[Buffer]

    Create an HTTP HEAD request to send to the server using an absolute URI, specifying a response handler to receive the response

    Create an HTTP HEAD request to send to the server using an absolute URI, specifying a response handler to receive the response

    absoluteURI

      the absolute URI

    returns

      an HTTP client request object

25.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
26.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
27.  final def notify(): Unit
    Definition Classes
      AnyRef
28.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
29.  def patch(host: String, requestURI: String): HttpRequest[Buffer]

    Create an HTTP PATCH request to send to the server at the specified host and default port.

    Create an HTTP PATCH request to send to the server at the specified host and default port.

    host

      the host

    requestURI

      the relative URI

    returns

      an HTTP client request object

30.  def patch(port: Int, host: String, requestURI: String): HttpRequest[Buffer]

    Create an HTTP PATCH request to send to the server at the specified host and port.

    Create an HTTP PATCH request to send to the server at the specified host and port.

    port

      the port

    host

      the host

    requestURI

      the relative URI

    returns

      an HTTP client request object

31.  def patch(requestURI: String): HttpRequest[Buffer]

    Create an HTTP PATCH request to send to the server at the default host and port.

    Create an HTTP PATCH request to send to the server at the default host and port.

    requestURI

      the relative URI

    returns

      an HTTP client request object

32.  def patchAbs(absoluteURI: String): HttpRequest[Buffer]

    Create an HTTP PATCH request to send to the server using an absolute URI, specifying a response handler to receive the response

    Create an HTTP PATCH request to send to the server using an absolute URI, specifying a response handler to receive the response

    absoluteURI

      the absolute URI

    returns

      an HTTP client request object

33.  def post(host: String, requestURI: String): HttpRequest[Buffer]

    Create an HTTP POST request to send to the server at the specified host and default port.

    Create an HTTP POST request to send to the server at the specified host and default port.

    host

      the host

    requestURI

      the relative URI

    returns

      an HTTP client request object

34.  def post(port: Int, host: String, requestURI: String): HttpRequest[Buffer]

    Create an HTTP POST request to send to the server at the specified host and port.

    Create an HTTP POST request to send to the server at the specified host and port.

    port

      the port

    host

      the host

    requestURI

      the relative URI

    returns

      an HTTP client request object

35.  def post(requestURI: String): HttpRequest[Buffer]

    Create an HTTP POST request to send to the server at the default host and port.

    Create an HTTP POST request to send to the server at the default host and port.

    requestURI

      the relative URI

    returns

      an HTTP client request object

36.  def postAbs(absoluteURI: String): HttpRequest[Buffer]

    Create an HTTP POST request to send to the server using an absolute URI, specifying a response handler to receive the response

    Create an HTTP POST request to send to the server using an absolute URI, specifying a response handler to receive the response

    absoluteURI

      the absolute URI

    returns

      an HTTP client request object

37.  def put(host: String, requestURI: String): HttpRequest[Buffer]

    Create an HTTP PUT request to send to the server at the specified host and default port.

    Create an HTTP PUT request to send to the server at the specified host and default port.

    host

      the host

    requestURI

      the relative URI

    returns

      an HTTP client request object

38.  def put(port: Int, host: String, requestURI: String): HttpRequest[Buffer]

    Create an HTTP PUT request to send to the server at the specified host and port.

    Create an HTTP PUT request to send to the server at the specified host and port.

    port

      the port

    host

      the host

    requestURI

      the relative URI

    returns

      an HTTP client request object

39.  def put(requestURI: String): HttpRequest[Buffer]

    Create an HTTP PUT request to send to the server at the default host and port.

    Create an HTTP PUT request to send to the server at the default host and port.

    requestURI

      the relative URI

    returns

      an HTTP client request object

40.  def putAbs(absoluteURI: String): HttpRequest[Buffer]

    Create an HTTP PUT request to send to the server using an absolute URI, specifying a response handler to receive the response

    Create an HTTP PUT request to send to the server using an absolute URI, specifying a response handler to receive the response

    absoluteURI

      the absolute URI

    returns

      an HTTP client request object

41.  def request(method: HttpMethod, options: RequestOptions): HttpRequest[Buffer]

    Create an HTTP request to send to the server at the specified host and port.

    Create an HTTP request to send to the server at the specified host and port.

    method

      the HTTP method

    options

      the request optionssee RequestOptions

    returns

      an HTTP client request object

42.  def request(method: HttpMethod, requestURI: String): HttpRequest[Buffer]

    Create an HTTP request to send to the server at the default host and port.

    Create an HTTP request to send to the server at the default host and port.

    method

      the HTTP method

    requestURI

      the relative URI

    returns

      an HTTP client request object

43.  def request(method: HttpMethod, host: String, requestURI: String): HttpRequest[Buffer]

    Create an HTTP request to send to the server at the specified host and default port.

    Create an HTTP request to send to the server at the specified host and default port.

    method

      the HTTP method

    host

      the host

    requestURI

      the relative URI

    returns

      an HTTP client request object

44.  def request(method: HttpMethod, port: Int, host: String, requestURI: String): HttpRequest[Buffer]

    Create an HTTP request to send to the server at the specified host and port.

    Create an HTTP request to send to the server at the specified host and port.

    method

      the HTTP method

    port

      the port

    host

      the host

    requestURI

      the relative URI

    returns

      an HTTP client request object

45.  def requestAbs(method: HttpMethod, absoluteURI: String): HttpRequest[Buffer]

    Create an HTTP request to send to the server using an absolute URI

    Create an HTTP request to send to the server using an absolute URI

    method

      the HTTP method

    absoluteURI

      the absolute URI

    returns

      an HTTP client request object

46.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
47.  def toString(): String
    Definition Classes
      AnyRef → Any
48.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
49.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
50.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

### Inherited from AnyRef

### Inherited from Any

### Ungrouped