Interface HttpClient
- All Superinterfaces:
MutinyDelegate
- All Known Implementing Classes:
HttpClient.HttpClientImpl,HttpClientAgent,HttpClientConnection
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 -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<Void>close()Close immediately (shutdown(0, TimeUnit.SECONDS).io.vertx.core.http.HttpClientstatic HttpClientnewInstance(io.vertx.core.http.HttpClient delegate) Creates a new instance of theHttpClient.io.smallrye.mutiny.Uni<HttpClientRequest>request()Create an HTTP request to send to the server with the default host and port of the client.io.smallrye.mutiny.Uni<HttpClientRequest>Create an HTTP request to send to the server at thehostandport.io.smallrye.mutiny.Uni<HttpClientRequest>Create an HTTP request to send to the server at the default host and port.io.smallrye.mutiny.Uni<HttpClientRequest>Create an HTTP request to send to the server at thehostand 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()Shutdown with a 30 seconds timeout (shutdown(30, TimeUnit.SECONDS)).io.smallrye.mutiny.Uni<Void>Callsshutdown(Duration).io.smallrye.mutiny.Uni<Void>Initiate the client shutdown sequence.
-
Method Details
-
getDelegate
io.vertx.core.http.HttpClient getDelegate()- Specified by:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate used by this Mutiny object of generated type
-
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
Unirepresenting 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
Unirepresenting 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 thehostandport.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 methodport- the porthost- the hostrequestURI- the relative URI- Returns:
- A
Unirepresenting 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 thehostand 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 methodhost- the hostrequestURI- the relative URI- Returns:
- A
Unirepresenting 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 methodrequestURI- the relative URI- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
HttpClient.request(HttpMethod, String)
-
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
Unirepresenting the asynchronous result of this operation. - See Also:
-
HttpClient.shutdown()
-
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
Unirepresenting the asynchronous result of this operation. - See Also:
-
HttpClient.close()
-
shutdown
Callsshutdown(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
Unirepresenting the asynchronous result of this operation. - See Also:
-
HttpClient.shutdown(long, TimeUnit)
-
shutdown
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
timeoutexpires, 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
Unirepresenting the asynchronous result of this operation. - See Also:
-
HttpClient.shutdown(Duration)
-
newInstance
Creates a new instance of theHttpClient.
-