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

request parameters

unified error handling

form submissions

The web client does not deprecate the Vert.x Core HttpClient, indeed it is based on
this client and inherits its configuration and great features like pooling, HTTP/2 support, pipelining support, etc…​
The HttpClient should be used when fine grained control over the HTTP
requests/responses is necessary.

The web client does not provide a WebSocket API, the Vert.x Core HttpClient should
be used.

Using the web client

To use Vert.x Web Client, add the following dependency to the dependencies section of your build descriptor:

Writing request bodies

// Send a buffer to the server using POST, the content-length header will be set for you
client.post(8080, "myserver.mycompany.com", "/some-uri").sendBuffer(buffer, { ar ->
if (ar.succeeded()) {
// Ok
}
})

Sending a single buffer is useful but often you don’t want to load fully the content in memory because
it may be too large or you want to handle many concurrent requests and want to use just the minimum
for each request. For this purpose the web client can send ReadStream<Buffer> (e.g a
AsyncFile is a ReadStream<Buffer>`) with the sendStream method

Code not translatable

The web client takes care of setting up the transfer pump for you. Since the length of the stream is not know
the request will use chunked transfer encoding .

When you know the size of the stream, you shall specify before using the content-length header

When large response are expected, use the BodyCodec.pipe.
This body codec pumps the response body buffers to a WriteStream
and signals the success or the failure of the operation in the async result response