vertx-lang-scala-docs_2.12 3.4.2 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
-  package codec
  Definition Classes
    web
-  package handler
  Definition Classes
    web
-  package sstore
  Definition Classes
    web
-  package templ
  Definition Classes
    web

p

io.vertx.scala.ext.web

# client 

#### package client

 
Ordering

1. Alphabetic

Visibility

1. Public
2. All

### Type Members

1.  class HttpRequest [T] extends AnyRef

   A client-side HTTP request.

   A client-side HTTP request.

   Instances are created by an io.vertx.scala.ext.web.client.WebClient instance, via one of the methods corresponding to the specific HTTP methods such as io.vertx.scala.ext.web.client.WebClient#get, etc...

   The request shall be configured prior sending, the request is immutable and when a mutator method is called, a new request is returned allowing to expose the request in a public API and apply further customization.

   After the request has been configured, the methods

   - io.vertx.scala.ext.web.client.HttpRequest#sendFuture
   - io.vertx.scala.ext.web.client.HttpRequest#sendStreamFuture
   - io.vertx.scala.ext.web.client.HttpRequest#sendJsonFuture ()}
   - io.vertx.scala.ext.web.client.HttpRequest#sendFormFuture

   can be called. The `sendXXX` methods perform the actual request, they can be called multiple times to perform the same HTTP request at different points in time.

   The handler is called back with

   - an io.vertx.scala.ext.web.client.HttpResponse instance when the HTTP response has been received
   - a failure when the HTTP request failed (like a connection error) or when the HTTP response could not be obtained (like connection or unmarshalling errors)

   Most of the time, this client will buffer the HTTP response fully unless a specific is used such as .

2.  class HttpResponse [T] extends AnyRef

   An HTTP response.

   An HTTP response.

   The usual HTTP response attributes are available:

   - io.vertx.scala.ext.web.client.HttpResponse#statusCode the HTTP status code
   - io.vertx.scala.ext.web.client.HttpResponse#statusMessage the HTTP status message
   - io.vertx.scala.ext.web.client.HttpResponse#headers the HTTP headers
   - io.vertx.scala.ext.web.client.HttpResponse#version the HTTP version

   The body of the response is returned by io.vertx.scala.ext.web.client.HttpResponse#body decoded as the format specified by the that built the response.

   Keep in mind that using this `HttpResponse` impose to fully buffer the response body and should be used for payload that can fit in memory.

3.  class WebClient extends AnyRef

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

   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.

4.  class WebClientOptions extends HttpClientOptions

### Value Members

1.  object HttpRequest
2.  object HttpResponse
3.  object WebClient
4.  object WebClientOptions

### Ungrouped