Class: VertxWebClient::WebClient
- Inherits:
-
Object
- Object
- VertxWebClient::WebClient
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb
Overview
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)
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)
vertx
instance.
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,=nil) if vertx.class.method_defined?(:j_del) && !block_given? && == 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) && .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())),::VertxWebClient::WebClient) end raise ArgumentError, "Invalid arguments when calling create(#{vertx},#{})" 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)
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.
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.
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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.
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)
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.
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 |