Module vertx.effect

Class 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 a HttpClientOptions instance. It's just another verticle that needs to be deployed. You can create as many as you want, with different configurations:
     
          HttpClientOptions server1Options = new HttpClientOptions();
          HttpClientOptions server2Options = new HttpClientOptions();
    
          HttpClientModule  httpServer1Module = new HttpClientModule(server1Options);
          HttpClientModule  httpServer2Module = new HttpClientModule(server2Options);
    
          vertx.deployVerticle(httpServer1Module);
          vertx.deployVerticle(httpServer2Module);
     
     
    Once deployed, you can use the defined functions get, post, put, delete and so on.
    • Field Detail

      • get

        public final λc<GetReq,​jsonvalues.JsObj> get
        represents a GET request. It takes as input a GetReq instance and returns a response in a JsObj. The class HttpResp contains all the lenses and functions to get info from the response and manipulate it
      • post

        public final λc<PostReq,​jsonvalues.JsObj> post
        represents a POST request. It takes as input a PostReq instance and returns a response in a JsObj. The class HttpResp contains all the lenses and functions to get info from the response and manipulate it
      • put

        public final λc<PutReq,​jsonvalues.JsObj> put
        represents a PUT request. It takes as input a PutReq instance and returns a response in a JsObj. The class HttpResp contains all the lenses and functions to get info from the response and manipulate it
      • delete

        public final λc<DeleteReq,​jsonvalues.JsObj> delete
        represents a DELETE request. It takes as input a DeleteReq instance and returns a response in a JsObj. The class HttpResp contains all the lenses and functions to get info from the response and manipulate it
      • head

        public final λc<HeadReq,​jsonvalues.JsObj> head
        represents a HEAD request. It takes as input a HeadReq instance and returns a response in a JsObj. The class HttpResp contains all the lenses and functions to get info from the response and manipulate it
      • options

        public final λc<OptionsReq,​jsonvalues.JsObj> options
        represents a OPTIONS request. It takes as input a OptionsReq instance and returns a response in a JsObj. The class HttpResp contains all the lenses and functions to get info from the response and manipulate it
      • patch

        public final λc<PatchReq,​jsonvalues.JsObj> patch
        represents a PATCH request. It takes as input a PatchReq instance and returns a response in a JsObj. The class HttpResp contains all the lenses and functions to get info from the response and manipulate it
      • trace

        public final λc<TraceReq,​jsonvalues.JsObj> trace
        represents a TRACE request. It takes as input a TraceReq instance and returns a response in a JsObj. The class HttpResp contains 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 a ConnectReq instance and returns a response in a JsObj. The class HttpResp contains 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)