- java.lang.Object
-
- io.vertx.core.AbstractVerticle
-
- vertx.effect.VertxModule
-
- vertx.effect.core.AbstractHttpClientModule
-
- vertx.effect.httpclient.HttpClientModule
-
- All Implemented Interfaces:
io.vertx.core.Verticle
- Direct Known Subclasses:
OauthModule
public abstract class HttpClientModule extends AbstractHttpClientModule
Module that exposes a set of functions to send different requests to a server. It's created from aHttpClientOptionsinstance. It's just another verticle that needs to be deployed. You can create as many as you want, with different configurations:
Once deployed, you can use the defined functionsHttpClientOptions server1Options = new HttpClientOptions(); HttpClientOptions server2Options = new HttpClientOptions(); HttpClientModule httpServer1Module = new HttpClientModule(server1Options); HttpClientModule httpServer2Module = new HttpClientModule(server2Options); vertx.deployVerticle(httpServer1Module); vertx.deployVerticle(httpServer2Module);get,post,put,deleteand so on.
-
-
Field Summary
Fields Modifier and Type Field Description λc<ConnectReq,jsonvalues.JsObj>connectrepresents a CONNECT request.λc<DeleteReq,jsonvalues.JsObj>deleterepresents a DELETE request.λc<GetReq,jsonvalues.JsObj>getrepresents a GET request.λc<HeadReq,jsonvalues.JsObj>headrepresents a HEAD request.λc<OptionsReq,jsonvalues.JsObj>optionsrepresents a OPTIONS request.λc<PatchReq,jsonvalues.JsObj>patchrepresents a PATCH request.λc<PostReq,jsonvalues.JsObj>postrepresents a POST request.λc<PutReq,jsonvalues.JsObj>putrepresents a PUT request.λc<TraceReq,jsonvalues.JsObj>tracerepresents a TRACE request.-
Fields inherited from class vertx.effect.core.AbstractHttpClientModule
httpClient, httpClientAddress, httpOptions
-
Fields inherited from class vertx.effect.VertxModule
deploymentOptions, vertxRef
-
-
Constructor Summary
Constructors Constructor Description HttpClientModule(io.vertx.core.http.HttpClientOptions options, String address)
-
Method Summary
-
Methods inherited from class vertx.effect.core.AbstractHttpClientModule
deploy, initialize
-
Methods inherited from class vertx.effect.VertxModule
ask, ask, deploy, deploy, deploy, deploy, deployConsumer, deployConsumer, deployVerticle, deployVerticle, start, tell, tell, trace, trace
-
-
-
-
Field Detail
-
options
public final λc<OptionsReq,jsonvalues.JsObj> options
represents a OPTIONS request. It takes as input aOptionsReqinstance and returns a response in a JsObj. The classHttpRespcontains all the lenses and functions to get info from the response and manipulate it
-
connect
public final λc<ConnectReq,jsonvalues.JsObj> connect
represents a CONNECT request. It takes as input aConnectReqinstance and returns a response in a JsObj. The classHttpRespcontains all the lenses and functions to get info from the response and manipulate it
-
-
Constructor Detail
-
HttpClientModule
public HttpClientModule(io.vertx.core.http.HttpClientOptions options, String address)
-
-