Interface HttpClient

All Superinterfaces:
MutinyDelegate
All Known Implementing Classes:
HttpClient.HttpClientImpl, HttpClientAgent, HttpClientConnection

public interface HttpClient extends MutinyDelegate
The API to interacts with an HTTP server.

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

Author:
Tim Fox
See Also:
  • HttpClient
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.smallrye.mutiny.Uni<Void>
    Close immediately (shutdown(0, TimeUnit.SECONDS).
    io.vertx.core.http.HttpClient
     
    static HttpClient
    newInstance(io.vertx.core.http.HttpClient delegate)
    Creates a new instance of the HttpClient.
    io.smallrye.mutiny.Uni<HttpClientRequest>
    Create an HTTP request to send to the server with the default host and port of the client.
    io.smallrye.mutiny.Uni<HttpClientRequest>
    request(io.vertx.core.http.HttpMethod method, int port, String host, String requestURI)
    Create an HTTP request to send to the server at the host and port.
    io.smallrye.mutiny.Uni<HttpClientRequest>
    request(io.vertx.core.http.HttpMethod method, String requestURI)
    Create an HTTP request to send to the server at the default host and port.
    io.smallrye.mutiny.Uni<HttpClientRequest>
    request(io.vertx.core.http.HttpMethod method, String host, String requestURI)
    Create an HTTP request to send to the server at the host and default port.
    io.smallrye.mutiny.Uni<HttpClientRequest>
    request(io.vertx.core.http.RequestOptions options)
    Create an HTTP request to send to the server.
    io.smallrye.mutiny.Uni<Void>
    Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).
    io.smallrye.mutiny.Uni<Void>
    shutdown(long timeout, TimeUnit unit)
    io.smallrye.mutiny.Uni<Void>
    shutdown(Duration timeout)
    Initiate the client shutdown sequence.
  • Method Details

    • getDelegate

      io.vertx.core.http.HttpClient getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • request

      @CheckReturnValue io.smallrye.mutiny.Uni<HttpClientRequest> request()
      Create an HTTP request to send to the server with the default host and port of the client.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • HttpClient.request()
    • request

      @CheckReturnValue io.smallrye.mutiny.Uni<HttpClientRequest> request(io.vertx.core.http.RequestOptions options)
      Create an HTTP request to send to the server.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      options - the request options
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • HttpClient.request(RequestOptions)
    • request

      @CheckReturnValue io.smallrye.mutiny.Uni<HttpClientRequest> request(io.vertx.core.http.HttpMethod method, int port, String host, String requestURI)
      Create an HTTP request to send to the server at the host and port.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      method - the HTTP method
      port - the port
      host - the host
      requestURI - the relative URI
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • HttpClient.request(HttpMethod, int, String, String)
    • request

      @CheckReturnValue io.smallrye.mutiny.Uni<HttpClientRequest> request(io.vertx.core.http.HttpMethod method, String host, String requestURI)
      Create an HTTP request to send to the server at the host and default port.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      method - the HTTP method
      host - the host
      requestURI - the relative URI
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • HttpClient.request(HttpMethod, String, String)
    • request

      @CheckReturnValue io.smallrye.mutiny.Uni<HttpClientRequest> request(io.vertx.core.http.HttpMethod method, String requestURI)
      Create an HTTP request to send to the server at the default host and port.

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      method - the HTTP method
      requestURI - the relative URI
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • HttpClient.request(HttpMethod, String)
    • shutdown

      @CheckReturnValue io.smallrye.mutiny.Uni<Void> shutdown()
      Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • HttpClient.shutdown()
    • close

      @CheckReturnValue io.smallrye.mutiny.Uni<Void> close()
      Close immediately (shutdown(0, TimeUnit.SECONDS).

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • HttpClient.close()
    • shutdown

      @CheckReturnValue io.smallrye.mutiny.Uni<Void> shutdown(long timeout, TimeUnit unit)
      Calls shutdown(Duration).

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • HttpClient.shutdown(long, TimeUnit)
    • shutdown

      @CheckReturnValue io.smallrye.mutiny.Uni<Void> shutdown(Duration timeout)
      Initiate the client shutdown sequence.

      Connections are taken out of service and closed when all inflight requests are processed, client connection are immediately removed from the pool. When all connections are closed the client is closed. When the timeout expires, all unclosed connections are immediately closed.

      • HTTP/2 connections will send a go away frame immediately to signal the other side the connection will close
      • HTTP/1.x client connection will be closed after the current response is received

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Parameters:
      timeout - the amount of time after which all resources are forcibly closed
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • HttpClient.shutdown(Duration)
    • newInstance

      static HttpClient newInstance(io.vertx.core.http.HttpClient delegate)
      Creates a new instance of the HttpClient.