Class List Method List File List

# Class: VertxWebClient::WebClient

Inherits:
  Object
  - Object
  - VertxWebClient::WebClient
  show all
Defined in:
  /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb

## Overview

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.

## Constant Summary

@@j_api_type =

      Object.new

## Class Method Summary (collapse)

- + (Boolean) accept?(obj)
- + (::VertxWebClient::WebClient) create(vertx = nil, options = nil)
  Create a web client using the provided vertx instance.
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (::VertxWebClient::WebClient) wrap(httpClient = nil, options = nil)
  Wrap an httpClient with a web client and default options.

## Instance Method Summary (collapse)

- - (void) close
  Close the client.
- - (::VertxWebClient::HttpRequest) delete(param_1 = nil, param_2 = nil, param_3 = nil)
  Create an HTTP DELETE request to send to the server at the specified host and port.
- - (::VertxWebClient::HttpRequest) delete_abs(absoluteURI = nil)
  Create an HTTP DELETE request to send to the server using an absolute URI, specifying a response handler to receive the response.
- - (::VertxWebClient::HttpRequest) get(param_1 = nil, param_2 = nil, param_3 = nil)
  Create an HTTP GET request to send to the server at the specified host and port.
- - (::VertxWebClient::HttpRequest) get_abs(absoluteURI = nil)
  Create an HTTP GET request to send to the server using an absolute URI, specifying a response handler to receive the response.
- - (::VertxWebClient::HttpRequest) head(param_1 = nil, param_2 = nil, param_3 = nil)
  Create an HTTP HEAD request to send to the server at the specified host and port.
- - (::VertxWebClient::HttpRequest) head_abs(absoluteURI = nil)
  Create an HTTP HEAD request to send to the server using an absolute URI, specifying a response handler to receive the response.
- - (::VertxWebClient::HttpRequest) patch(param_1 = nil, param_2 = nil, param_3 = nil)
  Create an HTTP PATCH request to send to the server at the specified host and port.
- - (::VertxWebClient::HttpRequest) patch_abs(absoluteURI = nil)
  Create an HTTP PATCH request to send to the server using an absolute URI, specifying a response handler to receive the response.
- - (::VertxWebClient::HttpRequest) post(param_1 = nil, param_2 = nil, param_3 = nil)
  Create an HTTP POST request to send to the server at the specified host and port.
- - (::VertxWebClient::HttpRequest) post_abs(absoluteURI = nil)
  Create an HTTP POST request to send to the server using an absolute URI, specifying a response handler to receive the response.
- - (::VertxWebClient::HttpRequest) put(param_1 = nil, param_2 = nil, param_3 = nil)
  Create an HTTP PUT request to send to the server at the specified host and port.
- - (::VertxWebClient::HttpRequest) put_abs(absoluteURI = nil)
  Create an HTTP PUT request to send to the server using an absolute URI, specifying a response handler to receive the response.
- - (::VertxWebClient::HttpRequest) raw(param_1 = nil, param_2 = nil, param_3 = nil, param_4 = nil)
  Create a request with a custom HTTP method to send to the server at the specified host and port.
- - (::VertxWebClient::HttpRequest) raw_abs(customHttpMethod = nil, absoluteURI = nil)
  Create a request with a custom HTTP method to send to the server using an absolute URI, specifying a response handler to receive the response.
- - (::VertxWebClient::HttpRequest) request(param_1 = nil, param_2 = nil, param_3 = nil, param_4 = nil, param_5 = nil)
  Like #request using the serverAddress parameter to connect to the server instead of the port and host parameters.
- - (::VertxWebClient::HttpRequest) request_abs(param_1 = nil, param_2 = nil, param_3 = nil)
  Like #request_abs using the serverAddress parameter to connect to the server instead of the absoluteURI parameter.

## Class Method Details

### + (`Boolean`) accept?(obj)

Returns:

- (`Boolean`)

    34
    35
    36
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 34

    def @@j_api_type.accept?(obj)
      obj.class == WebClient
    end

### + (`::VertxWebClient::WebClient`) create(vertx = nil, options = nil)

Create a web client using the provided `vertx` instance.

Parameters:

- vertx (`::Vertx::Vertx`) (defaults to: `nil`) —
  the vertx instance
- options (`Hash`) (defaults to: `nil`) —
  the Web Client options

Returns:

- (`::VertxWebClient::WebClient`) —
  the created web client

Raises:

- (`ArgumentError`)

    53
    54
    55
    56
    57
    58
    59
    60
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 53

    def self.create(vertx=nil,options=nil)
      if vertx.class.method_defined?(:j_del) && !block_given? && options == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebClient::WebClient.java_method(:create, [Java::IoVertxCore::Vertx.java_class]).call(vertx.j_del),::VertxWebClient::WebClient)
      elsif vertx.class.method_defined?(:j_del) && options.class == Hash && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebClient::WebClient.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::IoVertxExtWebClient::WebClientOptions.java_class]).call(vertx.j_del,Java::IoVertxExtWebClient::WebClientOptions.new(::Vertx::Util::Utils.to_json_object(options))),::VertxWebClient::WebClient)
      end
      raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{options})"
    end

### + (`Object`) j_api_type

    43
    44
    45
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 43

    def self.j_api_type
      @@j_api_type
    end

### + (`Object`) j_class

    46
    47
    48
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 46

    def self.j_class
      Java::IoVertxExtWebClient::WebClient.java_class
    end

### + (`Object`) unwrap(obj)

    40
    41
    42
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 40

    def @@j_api_type.unwrap(obj)
      obj.j_del
    end

### + (`::VertxWebClient::WebClient`) wrap(httpClient = nil, options = nil)

Wrap an `httpClient` with a web client and default options.

Only the specific web client portion of the `options` is used, the Hash of the `httpClient` is reused.

Parameters:

- httpClient (`::Vertx::HttpClient`) (defaults to: `nil`) —
  the to wrap
- options (`Hash`) (defaults to: `nil`) —
  the Web Client options

Returns:

- (`::VertxWebClient::WebClient`) —
  the web client

Raises:

- (`ArgumentError`)

    68
    69
    70
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 68

    def @@j_api_type.wrap(obj)
      WebClient.new(obj)
    end

## Instance Method Details

### - (`void`) close

This method returns an undefined value.

Close the client. Closing will close down any pooled connections. Clients should always be closed after use.

Raises:

- (`ArgumentError`)

    383
    384
    385
    386
    387
    388
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 383

    def close
      if !block_given?
        return @j_del.java_method(:close, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling close()"
    end

### - (`::VertxWebClient::HttpRequest`) delete(requestURI) - (`::VertxWebClient::HttpRequest`) delete(host, requestURI) - (`::VertxWebClient::HttpRequest`) delete(port, host, requestURI)

Create an HTTP DELETE request to send to the server at the specified host and port.

Overloads:

- - (`::VertxWebClient::HttpRequest`) delete(requestURI)

  Parameters:

  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) delete(host, requestURI)

  Parameters:

  - host (`String`) —
    the host
  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) delete(port, host, requestURI)

  Parameters:

  - port (`Fixnum`) —
    the port
  - host (`String`) —
    the host
  - requestURI (`String`) —
    the relative URI

Returns:

- (`::VertxWebClient::HttpRequest`) —
  an HTTP client request object

Raises:

- (`ArgumentError`)

    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 263

    def delete(param_1=nil,param_2=nil,param_3=nil)
      if param_1.class == String && !block_given? && param_2 == nil && param_3 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:delete, [Java::java.lang.String.java_class]).call(param_1),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == String && param_2.class == String && !block_given? && param_3 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:delete, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == Fixnum && param_2.class == String && param_3.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:delete, [Java::int.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2,param_3),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling delete(#{param_1},#{param_2},#{param_3})"
    end

### - (`::VertxWebClient::HttpRequest`) delete_abs(absoluteURI = nil)

Create an HTTP DELETE request to send to the server using an absolute URI, specifying a response handler to receive the response

Parameters:

- absoluteURI (`String`) (defaults to: `nil`) —
  the absolute URI

Returns:

- (`::VertxWebClient::HttpRequest`) —
  an HTTP client request object

Raises:

- (`ArgumentError`)

    277
    278
    279
    280
    281
    282
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 277

    def delete_abs(absoluteURI=nil)
      if absoluteURI.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:deleteAbs, [Java::java.lang.String.java_class]).call(absoluteURI),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling delete_abs(#{absoluteURI})"
    end

### - (`::VertxWebClient::HttpRequest`) get(requestURI) - (`::VertxWebClient::HttpRequest`) get(host, requestURI) - (`::VertxWebClient::HttpRequest`) get(port, host, requestURI)

Create an HTTP GET request to send to the server at the specified host and port.

Overloads:

- - (`::VertxWebClient::HttpRequest`) get(requestURI)

  Parameters:

  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) get(host, requestURI)

  Parameters:

  - host (`String`) —
    the host
  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) get(port, host, requestURI)

  Parameters:

  - port (`Fixnum`) —
    the port
  - host (`String`) —
    the host
  - requestURI (`String`) —
    the relative URI

Returns:

- (`::VertxWebClient::HttpRequest`) —
  an HTTP client request object

Raises:

- (`ArgumentError`)

    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 170

    def get(param_1=nil,param_2=nil,param_3=nil)
      if param_1.class == String && !block_given? && param_2 == nil && param_3 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:get, [Java::java.lang.String.java_class]).call(param_1),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == String && param_2.class == String && !block_given? && param_3 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:get, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == Fixnum && param_2.class == String && param_3.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:get, [Java::int.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2,param_3),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling get(#{param_1},#{param_2},#{param_3})"
    end

### - (`::VertxWebClient::HttpRequest`) get_abs(absoluteURI = nil)

Create an HTTP GET request to send to the server using an absolute URI, specifying a response handler to receive the response

Parameters:

- absoluteURI (`String`) (defaults to: `nil`) —
  the absolute URI

Returns:

- (`::VertxWebClient::HttpRequest`) —
  an HTTP client request object

Raises:

- (`ArgumentError`)

    184
    185
    186
    187
    188
    189
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 184

    def get_abs(absoluteURI=nil)
      if absoluteURI.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:getAbs, [Java::java.lang.String.java_class]).call(absoluteURI),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling get_abs(#{absoluteURI})"
    end

### - (`::VertxWebClient::HttpRequest`) head(requestURI) - (`::VertxWebClient::HttpRequest`) head(host, requestURI) - (`::VertxWebClient::HttpRequest`) head(port, host, requestURI)

Create an HTTP HEAD request to send to the server at the specified host and port.

Overloads:

- - (`::VertxWebClient::HttpRequest`) head(requestURI)

  Parameters:

  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) head(host, requestURI)

  Parameters:

  - host (`String`) —
    the host
  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) head(port, host, requestURI)

  Parameters:

  - port (`Fixnum`) —
    the port
  - host (`String`) —
    the host
  - requestURI (`String`) —
    the relative URI

Returns:

- (`::VertxWebClient::HttpRequest`) —
  an HTTP client request object

Raises:

- (`ArgumentError`)

    325
    326
    327
    328
    329
    330
    331
    332
    333
    334
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 325

    def head(param_1=nil,param_2=nil,param_3=nil)
      if param_1.class == String && !block_given? && param_2 == nil && param_3 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:head, [Java::java.lang.String.java_class]).call(param_1),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == String && param_2.class == String && !block_given? && param_3 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:head, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == Fixnum && param_2.class == String && param_3.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:head, [Java::int.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2,param_3),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling head(#{param_1},#{param_2},#{param_3})"
    end

### - (`::VertxWebClient::HttpRequest`) head_abs(absoluteURI = nil)

Create an HTTP HEAD request to send to the server using an absolute URI, specifying a response handler to receive the response

Parameters:

- absoluteURI (`String`) (defaults to: `nil`) —
  the absolute URI

Returns:

- (`::VertxWebClient::HttpRequest`) —
  an HTTP client request object

Raises:

- (`ArgumentError`)

    339
    340
    341
    342
    343
    344
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 339

    def head_abs(absoluteURI=nil)
      if absoluteURI.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:headAbs, [Java::java.lang.String.java_class]).call(absoluteURI),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling head_abs(#{absoluteURI})"
    end

### - (`::VertxWebClient::HttpRequest`) patch(requestURI) - (`::VertxWebClient::HttpRequest`) patch(host, requestURI) - (`::VertxWebClient::HttpRequest`) patch(port, host, requestURI)

Create an HTTP PATCH request to send to the server at the specified host and port.

Overloads:

- - (`::VertxWebClient::HttpRequest`) patch(requestURI)

  Parameters:

  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) patch(host, requestURI)

  Parameters:

  - host (`String`) —
    the host
  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) patch(port, host, requestURI)

  Parameters:

  - port (`Fixnum`) —
    the port
  - host (`String`) —
    the host
  - requestURI (`String`) —
    the relative URI

Returns:

- (`::VertxWebClient::HttpRequest`) —
  an HTTP client request object

Raises:

- (`ArgumentError`)

    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 294

    def patch(param_1=nil,param_2=nil,param_3=nil)
      if param_1.class == String && !block_given? && param_2 == nil && param_3 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:patch, [Java::java.lang.String.java_class]).call(param_1),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == String && param_2.class == String && !block_given? && param_3 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:patch, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == Fixnum && param_2.class == String && param_3.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:patch, [Java::int.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2,param_3),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling patch(#{param_1},#{param_2},#{param_3})"
    end

### - (`::VertxWebClient::HttpRequest`) patch_abs(absoluteURI = nil)

Create an HTTP PATCH request to send to the server using an absolute URI, specifying a response handler to receive the response

Parameters:

- absoluteURI (`String`) (defaults to: `nil`) —
  the absolute URI

Returns:

- (`::VertxWebClient::HttpRequest`) —
  an HTTP client request object

Raises:

- (`ArgumentError`)

    308
    309
    310
    311
    312
    313
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 308

    def patch_abs(absoluteURI=nil)
      if absoluteURI.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:patchAbs, [Java::java.lang.String.java_class]).call(absoluteURI),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling patch_abs(#{absoluteURI})"
    end

### - (`::VertxWebClient::HttpRequest`) post(requestURI) - (`::VertxWebClient::HttpRequest`) post(host, requestURI) - (`::VertxWebClient::HttpRequest`) post(port, host, requestURI)

Create an HTTP POST request to send to the server at the specified host and port.

Overloads:

- - (`::VertxWebClient::HttpRequest`) post(requestURI)

  Parameters:

  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) post(host, requestURI)

  Parameters:

  - host (`String`) —
    the host
  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) post(port, host, requestURI)

  Parameters:

  - port (`Fixnum`) —
    the port
  - host (`String`) —
    the host
  - requestURI (`String`) —
    the relative URI

Returns:

- (`::VertxWebClient::HttpRequest`) —
  an HTTP client request object

Raises:

- (`ArgumentError`)

    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 201

    def post(param_1=nil,param_2=nil,param_3=nil)
      if param_1.class == String && !block_given? && param_2 == nil && param_3 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:post, [Java::java.lang.String.java_class]).call(param_1),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == String && param_2.class == String && !block_given? && param_3 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:post, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == Fixnum && param_2.class == String && param_3.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:post, [Java::int.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2,param_3),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling post(#{param_1},#{param_2},#{param_3})"
    end

### - (`::VertxWebClient::HttpRequest`) post_abs(absoluteURI = nil)

Create an HTTP POST request to send to the server using an absolute URI, specifying a response handler to receive the response

Parameters:

- absoluteURI (`String`) (defaults to: `nil`) —
  the absolute URI

Returns:

- (`::VertxWebClient::HttpRequest`) —
  an HTTP client request object

Raises:

- (`ArgumentError`)

    215
    216
    217
    218
    219
    220
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 215

    def post_abs(absoluteURI=nil)
      if absoluteURI.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:postAbs, [Java::java.lang.String.java_class]).call(absoluteURI),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling post_abs(#{absoluteURI})"
    end

### - (`::VertxWebClient::HttpRequest`) put(requestURI) - (`::VertxWebClient::HttpRequest`) put(host, requestURI) - (`::VertxWebClient::HttpRequest`) put(port, host, requestURI)

Create an HTTP PUT request to send to the server at the specified host and port.

Overloads:

- - (`::VertxWebClient::HttpRequest`) put(requestURI)

  Parameters:

  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) put(host, requestURI)

  Parameters:

  - host (`String`) —
    the host
  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) put(port, host, requestURI)

  Parameters:

  - port (`Fixnum`) —
    the port
  - host (`String`) —
    the host
  - requestURI (`String`) —
    the relative URI

Returns:

- (`::VertxWebClient::HttpRequest`) —
  an HTTP client request object

Raises:

- (`ArgumentError`)

    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 232

    def put(param_1=nil,param_2=nil,param_3=nil)
      if param_1.class == String && !block_given? && param_2 == nil && param_3 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:put, [Java::java.lang.String.java_class]).call(param_1),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == String && param_2.class == String && !block_given? && param_3 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:put, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == Fixnum && param_2.class == String && param_3.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:put, [Java::int.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2,param_3),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling put(#{param_1},#{param_2},#{param_3})"
    end

### - (`::VertxWebClient::HttpRequest`) put_abs(absoluteURI = nil)

Create an HTTP PUT request to send to the server using an absolute URI, specifying a response handler to receive the response

Parameters:

- absoluteURI (`String`) (defaults to: `nil`) —
  the absolute URI

Returns:

- (`::VertxWebClient::HttpRequest`) —
  an HTTP client request object

Raises:

- (`ArgumentError`)

    246
    247
    248
    249
    250
    251
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 246

    def put_abs(absoluteURI=nil)
      if absoluteURI.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:putAbs, [Java::java.lang.String.java_class]).call(absoluteURI),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling put_abs(#{absoluteURI})"
    end

### - (`::VertxWebClient::HttpRequest`) raw(customHttpMethod, requestURI) - (`::VertxWebClient::HttpRequest`) raw(customHttpMethod, host, requestURI) - (`::VertxWebClient::HttpRequest`) raw(customHttpMethod, port, host, requestURI)

Create a request with a custom HTTP method to send to the server at the specified host and port.

Overloads:

- - (`::VertxWebClient::HttpRequest`) raw(customHttpMethod, requestURI)

  Parameters:

  - customHttpMethod (`String`) —
    custom HTTP Method
  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) raw(customHttpMethod, host, requestURI)

  Parameters:

  - customHttpMethod (`String`) —
    custom HTTP Method
  - host (`String`) —
    the host
  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) raw(customHttpMethod, port, host, requestURI)

  Parameters:

  - customHttpMethod (`String`) —
    custom HTTP Method
  - port (`Fixnum`) —
    the port
  - host (`String`) —
    the host
  - requestURI (`String`) —
    the relative URI

Returns:

- (`::VertxWebClient::HttpRequest`) —
  an HTTP client request object

Raises:

- (`ArgumentError`)

    359
    360
    361
    362
    363
    364
    365
    366
    367
    368
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 359

    def raw(param_1=nil,param_2=nil,param_3=nil,param_4=nil)
      if param_1.class == String && param_2.class == String && !block_given? && param_3 == nil && param_4 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:raw, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == String && param_2.class == String && param_3.class == String && !block_given? && param_4 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:raw, [Java::java.lang.String.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2,param_3),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == String && param_2.class == Fixnum && param_3.class == String && param_4.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:raw, [Java::java.lang.String.java_class,Java::int.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2,param_3,param_4),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling raw(#{param_1},#{param_2},#{param_3},#{param_4})"
    end

### - (`::VertxWebClient::HttpRequest`) raw_abs(customHttpMethod = nil, absoluteURI = nil)

Create a request with a custom HTTP method to send to the server using an absolute URI, specifying a response handler to receive the response

Parameters:

- customHttpMethod (`String`) (defaults to: `nil`) —
  custom HTTP Method
- absoluteURI (`String`) (defaults to: `nil`) —
  the absolute URI

Returns:

- (`::VertxWebClient::HttpRequest`) —
  an HTTP client request object

Raises:

- (`ArgumentError`)

    374
    375
    376
    377
    378
    379
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 374

    def raw_abs(customHttpMethod=nil,absoluteURI=nil)
      if customHttpMethod.class == String && absoluteURI.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:rawAbs, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(customHttpMethod,absoluteURI),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling raw_abs(#{customHttpMethod},#{absoluteURI})"
    end

### - (`::VertxWebClient::HttpRequest`) request(method, requestURI) - (`::VertxWebClient::HttpRequest`) request(method, options) - (`::VertxWebClient::HttpRequest`) request(method, host, requestURI) - (`::VertxWebClient::HttpRequest`) request(method, serverAddress, requestURI) - (`::VertxWebClient::HttpRequest`) request(method, serverAddress, options) - (`::VertxWebClient::HttpRequest`) request(method, port, host, requestURI) - (`::VertxWebClient::HttpRequest`) request(method, serverAddress, host, requestURI) - (`::VertxWebClient::HttpRequest`) request(method, serverAddress, port, host, requestURI)

Like #request using the `serverAddress` parameter to connect to the server instead of the `port` and `host` parameters.

The request host header will still be created from the `port` and `host` parameters.

Use to connect to a unix domain socket server.

Overloads:

- - (`::VertxWebClient::HttpRequest`) request(method, requestURI)

  Parameters:

  - method (`:OPTIONS`, `:GET`, `:HEAD`, `:POST`, `:PUT`, `:DELETE`, `:TRACE`, `:CONNECT`, `:PATCH`, `:OTHER`) —
    the HTTP method
  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) request(method, options)

  Parameters:

  - method (`:OPTIONS`, `:GET`, `:HEAD`, `:POST`, `:PUT`, `:DELETE`, `:TRACE`, `:CONNECT`, `:PATCH`, `:OTHER`) —
    the HTTP method
  - options (`Hash`) —
    the request options
- - (`::VertxWebClient::HttpRequest`) request(method, host, requestURI)

  Parameters:

  - method (`:OPTIONS`, `:GET`, `:HEAD`, `:POST`, `:PUT`, `:DELETE`, `:TRACE`, `:CONNECT`, `:PATCH`, `:OTHER`) —
    the HTTP method
  - host (`String`) —
    the host
  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) request(method, serverAddress, requestURI)

  Parameters:

  - method (`:OPTIONS`, `:GET`, `:HEAD`, `:POST`, `:PUT`, `:DELETE`, `:TRACE`, `:CONNECT`, `:PATCH`, `:OTHER`)
  - serverAddress (`::Vertx::SocketAddress`)
  - requestURI (`String`)
- - (`::VertxWebClient::HttpRequest`) request(method, serverAddress, options)

  Parameters:

  - method (`:OPTIONS`, `:GET`, `:HEAD`, `:POST`, `:PUT`, `:DELETE`, `:TRACE`, `:CONNECT`, `:PATCH`, `:OTHER`)
  - serverAddress (`::Vertx::SocketAddress`)
  - options (`Hash`)
- - (`::VertxWebClient::HttpRequest`) request(method, port, host, requestURI)

  Parameters:

  - method (`:OPTIONS`, `:GET`, `:HEAD`, `:POST`, `:PUT`, `:DELETE`, `:TRACE`, `:CONNECT`, `:PATCH`, `:OTHER`) —
    the HTTP method
  - port (`Fixnum`) —
    the port
  - host (`String`) —
    the host
  - requestURI (`String`) —
    the relative URI
- - (`::VertxWebClient::HttpRequest`) request(method, serverAddress, host, requestURI)

  Parameters:

  - method (`:OPTIONS`, `:GET`, `:HEAD`, `:POST`, `:PUT`, `:DELETE`, `:TRACE`, `:CONNECT`, `:PATCH`, `:OTHER`)
  - serverAddress (`::Vertx::SocketAddress`)
  - host (`String`)
  - requestURI (`String`)
- - (`::VertxWebClient::HttpRequest`) request(method, serverAddress, port, host, requestURI)

  Parameters:

  - method (`:OPTIONS`, `:GET`, `:HEAD`, `:POST`, `:PUT`, `:DELETE`, `:TRACE`, `:CONNECT`, `:PATCH`, `:OTHER`)
  - serverAddress (`::Vertx::SocketAddress`)
  - port (`Fixnum`)
  - host (`String`)
  - requestURI (`String`)

Returns:

- (`::VertxWebClient::HttpRequest`)

Raises:

- (`ArgumentError`)

    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 117

    def request(param_1=nil,param_2=nil,param_3=nil,param_4=nil,param_5=nil)
      if param_1.class == Symbol && param_2.class == String && !block_given? && param_3 == nil && param_4 == nil && param_5 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:request, [Java::IoVertxCoreHttp::HttpMethod.java_class,Java::java.lang.String.java_class]).call(Java::IoVertxCoreHttp::HttpMethod.valueOf(param_1.to_s),param_2),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == Symbol && param_2.class == Hash && !block_given? && param_3 == nil && param_4 == nil && param_5 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:request, [Java::IoVertxCoreHttp::HttpMethod.java_class,Java::IoVertxCoreHttp::RequestOptions.java_class]).call(Java::IoVertxCoreHttp::HttpMethod.valueOf(param_1.to_s),Java::IoVertxCoreHttp::RequestOptions.new(::Vertx::Util::Utils.to_json_object(param_2))),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == Symbol && param_2.class == String && param_3.class == String && !block_given? && param_4 == nil && param_5 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:request, [Java::IoVertxCoreHttp::HttpMethod.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(Java::IoVertxCoreHttp::HttpMethod.valueOf(param_1.to_s),param_2,param_3),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == Symbol && param_2.class.method_defined?(:j_del) && param_3.class == String && !block_given? && param_4 == nil && param_5 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:request, [Java::IoVertxCoreHttp::HttpMethod.java_class,Java::IoVertxCoreNet::SocketAddress.java_class,Java::java.lang.String.java_class]).call(Java::IoVertxCoreHttp::HttpMethod.valueOf(param_1.to_s),param_2.j_del,param_3),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == Symbol && param_2.class.method_defined?(:j_del) && param_3.class == Hash && !block_given? && param_4 == nil && param_5 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:request, [Java::IoVertxCoreHttp::HttpMethod.java_class,Java::IoVertxCoreNet::SocketAddress.java_class,Java::IoVertxCoreHttp::RequestOptions.java_class]).call(Java::IoVertxCoreHttp::HttpMethod.valueOf(param_1.to_s),param_2.j_del,Java::IoVertxCoreHttp::RequestOptions.new(::Vertx::Util::Utils.to_json_object(param_3))),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == Symbol && param_2.class == Fixnum && param_3.class == String && param_4.class == String && !block_given? && param_5 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:request, [Java::IoVertxCoreHttp::HttpMethod.java_class,Java::int.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(Java::IoVertxCoreHttp::HttpMethod.valueOf(param_1.to_s),param_2,param_3,param_4),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == Symbol && param_2.class.method_defined?(:j_del) && param_3.class == String && param_4.class == String && !block_given? && param_5 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:request, [Java::IoVertxCoreHttp::HttpMethod.java_class,Java::IoVertxCoreNet::SocketAddress.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(Java::IoVertxCoreHttp::HttpMethod.valueOf(param_1.to_s),param_2.j_del,param_3,param_4),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == Symbol && param_2.class.method_defined?(:j_del) && param_3.class == Fixnum && param_4.class == String && param_5.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:request, [Java::IoVertxCoreHttp::HttpMethod.java_class,Java::IoVertxCoreNet::SocketAddress.java_class,Java::int.java_class,Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(Java::IoVertxCoreHttp::HttpMethod.valueOf(param_1.to_s),param_2.j_del,param_3,param_4,param_5),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling request(#{param_1},#{param_2},#{param_3},#{param_4},#{param_5})"
    end

### - (`::VertxWebClient::HttpRequest`) requestAbs(method, absoluteURI) - (`::VertxWebClient::HttpRequest`) requestAbs(method, serverAddress, absoluteURI)

Like #request_abs using the `serverAddress` parameter to connect to the server instead of the `absoluteURI` parameter.

The request host header will still be created from the `absoluteURI` parameter.

Use to connect to a unix domain socket server.

Overloads:

- - (`::VertxWebClient::HttpRequest`) requestAbs(method, absoluteURI)

  Parameters:

  - method (`:OPTIONS`, `:GET`, `:HEAD`, `:POST`, `:PUT`, `:DELETE`, `:TRACE`, `:CONNECT`, `:PATCH`, `:OTHER`) —
    the HTTP method
  - absoluteURI (`String`) —
    the absolute URI
- - (`::VertxWebClient::HttpRequest`) requestAbs(method, serverAddress, absoluteURI)

  Parameters:

  - method (`:OPTIONS`, `:GET`, `:HEAD`, `:POST`, `:PUT`, `:DELETE`, `:TRACE`, `:CONNECT`, `:PATCH`, `:OTHER`)
  - serverAddress (`::Vertx::SocketAddress`)
  - absoluteURI (`String`)

Returns:

- (`::VertxWebClient::HttpRequest`)

Raises:

- (`ArgumentError`)

    151
    152
    153
    154
    155
    156
    157
    158
    # File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 151

    def request_abs(param_1=nil,param_2=nil,param_3=nil)
      if param_1.class == Symbol && param_2.class == String && !block_given? && param_3 == nil
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:requestAbs, [Java::IoVertxCoreHttp::HttpMethod.java_class,Java::java.lang.String.java_class]).call(Java::IoVertxCoreHttp::HttpMethod.valueOf(param_1.to_s),param_2),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      elsif param_1.class == Symbol && param_2.class.method_defined?(:j_del) && param_3.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:requestAbs, [Java::IoVertxCoreHttp::HttpMethod.java_class,Java::IoVertxCoreNet::SocketAddress.java_class,Java::java.lang.String.java_class]).call(Java::IoVertxCoreHttp::HttpMethod.valueOf(param_1.to_s),param_2.j_del,param_3),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling request_abs(#{param_1},#{param_2},#{param_3})"
    end