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(*args)
Create a web client using the provided vertx instance.
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
-
+ (::VertxWebClient::WebClient) wrap(*args)
Wrap an httpClient with a web client and default options.
Instance Method Summary (collapse)
-
- (void) close
Close the client.
-
- (::VertxWebClient::HttpRequest) delete(*args)
Create an HTTP DELETE request to send to the server at the specified host and port.
-
- (::VertxWebClient::HttpRequest) deleteAbs(absoluteURI)
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(*args)
Create an HTTP GET request to send to the server at the specified host and port.
-
- (::VertxWebClient::HttpRequest) getAbs(absoluteURI)
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(*args)
Create an HTTP HEAD request to send to the server at the specified host and port.
-
- (::VertxWebClient::HttpRequest) headAbs(absoluteURI)
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(*args)
Create an HTTP PATCH request to send to the server at the specified host and port.
-
- (::VertxWebClient::HttpRequest) patchAbs(absoluteURI)
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(*args)
Create an HTTP POST request to send to the server at the specified host and port.
-
- (::VertxWebClient::HttpRequest) postAbs(absoluteURI)
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(*args)
Create an HTTP PUT request to send to the server at the specified host and port.
-
- (::VertxWebClient::HttpRequest) putAbs(absoluteURI)
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(*args)
Create a request with a custom HTTP method to send to the server at the specified host and port.
-
- (::VertxWebClient::HttpRequest) rawAbs(customHttpMethod, absoluteURI)
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(*args)
Like #request using the serverAddress parameter to connect to the server instead of the port and host parameters.
-
- (::VertxWebClient::HttpRequest) request_abs(*args)
Like #request_abs using the serverAddress parameter to connect to the server instead of the absoluteURI parameter.
Class Method Details
+ (Boolean) accept?(obj)
35 36 37 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 35 def @@j_api_type.accept?(obj) obj.class == WebClient end |
+ (::VertxWebClient::WebClient) create(vertx) + (::VertxWebClient::WebClient) create(vertx, options)
vertx
instance.
386 387 388 389 390 391 392 393 394 395 396 397 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 386 def self.create(*args) if args[0].class.method_defined?(:j_del) && !block_given? && args[1] == nil return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebClient::WebClient.java_method(:create, [Java::IoVertxCore::Vertx.java_class]).call(args[0].j_del),::VertxWebClient::WebClient) elsif args[0].class.method_defined?(:j_del) && args[1].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(args[0].j_del,Java::IoVertxExtWebClient::WebClientOptions.new(::Vertx::Util::Utils.to_json_object(args[1]))),::VertxWebClient::WebClient) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling create(#{args[0]},#{args[1]})" end end |
+ (Object) j_api_type
44 45 46 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 44 def self.j_api_type @@j_api_type end |
+ (Object) j_class
47 48 49 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 47 def self.j_class Java::IoVertxExtWebClient::WebClient.java_class end |
+ (Object) unwrap(obj)
41 42 43 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 41 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (::VertxWebClient::WebClient) wrap(httpClient) + (::VertxWebClient::WebClient) wrap(httpClient, options)
httpClient
with a web client and default options.
Only the specific web client portion of the options
is used, the => Object}
of the httpClient
is reused.
453 454 455 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 453 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.
433 434 435 436 437 438 439 440 441 442 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 433 def close if !block_given? return @j_del.java_method(:close, []).call() end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling close()" end end |
- (::VertxWebClient::HttpRequest) delete(requestURI) - (::VertxWebClient::HttpRequest) delete(host, requestURI) - (::VertxWebClient::HttpRequest) delete(port, host, requestURI)
169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 169 def delete(*args) if args[0].class == String && !block_given? && args[1] == nil && args[2] == nil return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:delete, [Java::java.lang.String.java_class]).call(args[0]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == String && args[1].class == String && !block_given? && args[2] == 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(args[0],args[1]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == Fixnum && args[1].class == String && args[2].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(args[0],args[1],args[2]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling delete(#{args[0]},#{args[1]},#{args[2]})" end end |
- (::VertxWebClient::HttpRequest) deleteAbs(absoluteURI)
369 370 371 372 373 374 375 376 377 378 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 369 def delete_abs(*args) if args[0].class == String && !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:deleteAbs, [Java::java.lang.String.java_class]).call(args[0]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling delete_abs(#{args[0]})" end end |
- (::VertxWebClient::HttpRequest) get(requestURI) - (::VertxWebClient::HttpRequest) get(host, requestURI) - (::VertxWebClient::HttpRequest) get(port, host, requestURI)
350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 350 def get(*args) if args[0].class == String && !block_given? && args[1] == nil && args[2] == nil return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:get, [Java::java.lang.String.java_class]).call(args[0]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == String && args[1].class == String && !block_given? && args[2] == 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(args[0],args[1]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == Fixnum && args[1].class == String && args[2].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(args[0],args[1],args[2]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get(#{args[0]},#{args[1]},#{args[2]})" end end |
- (::VertxWebClient::HttpRequest) getAbs(absoluteURI)
303 304 305 306 307 308 309 310 311 312 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 303 def get_abs(*args) if args[0].class == String && !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:getAbs, [Java::java.lang.String.java_class]).call(args[0]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling get_abs(#{args[0]})" end end |
- (::VertxWebClient::HttpRequest) head(requestURI) - (::VertxWebClient::HttpRequest) head(host, requestURI) - (::VertxWebClient::HttpRequest) head(port, host, requestURI)
219 220 221 222 223 224 225 226 227 228 229 230 231 232 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 219 def head(*args) if args[0].class == String && !block_given? && args[1] == nil && args[2] == nil return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:head, [Java::java.lang.String.java_class]).call(args[0]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == String && args[1].class == String && !block_given? && args[2] == 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(args[0],args[1]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == Fixnum && args[1].class == String && args[2].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(args[0],args[1],args[2]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling head(#{args[0]},#{args[1]},#{args[2]})" end end |
- (::VertxWebClient::HttpRequest) headAbs(absoluteURI)
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 head_abs(*args) if args[0].class == String && !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:headAbs, [Java::java.lang.String.java_class]).call(args[0]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling head_abs(#{args[0]})" end end |
- (::VertxWebClient::HttpRequest) patch(requestURI) - (::VertxWebClient::HttpRequest) patch(host, requestURI) - (::VertxWebClient::HttpRequest) patch(port, host, requestURI)
244 245 246 247 248 249 250 251 252 253 254 255 256 257 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 244 def patch(*args) if args[0].class == String && !block_given? && args[1] == nil && args[2] == nil return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:patch, [Java::java.lang.String.java_class]).call(args[0]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == String && args[1].class == String && !block_given? && args[2] == 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(args[0],args[1]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == Fixnum && args[1].class == String && args[2].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(args[0],args[1],args[2]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling patch(#{args[0]},#{args[1]},#{args[2]})" end end |
- (::VertxWebClient::HttpRequest) patchAbs(absoluteURI)
470 471 472 473 474 475 476 477 478 479 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 470 def patch_abs(*args) if args[0].class == String && !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:patchAbs, [Java::java.lang.String.java_class]).call(args[0]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling patch_abs(#{args[0]})" end end |
- (::VertxWebClient::HttpRequest) post(requestURI) - (::VertxWebClient::HttpRequest) post(host, requestURI) - (::VertxWebClient::HttpRequest) post(port, host, requestURI)
284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 284 def post(*args) if args[0].class == String && !block_given? && args[1] == nil && args[2] == nil return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:post, [Java::java.lang.String.java_class]).call(args[0]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == String && args[1].class == String && !block_given? && args[2] == 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(args[0],args[1]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == Fixnum && args[1].class == String && args[2].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(args[0],args[1],args[2]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling post(#{args[0]},#{args[1]},#{args[2]})" end end |
- (::VertxWebClient::HttpRequest) postAbs(absoluteURI)
419 420 421 422 423 424 425 426 427 428 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 419 def post_abs(*args) if args[0].class == String && !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:postAbs, [Java::java.lang.String.java_class]).call(args[0]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling post_abs(#{args[0]})" end end |
- (::VertxWebClient::HttpRequest) put(requestURI) - (::VertxWebClient::HttpRequest) put(host, requestURI) - (::VertxWebClient::HttpRequest) put(port, host, requestURI)
194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 194 def put(*args) if args[0].class == String && !block_given? && args[1] == nil && args[2] == nil return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:put, [Java::java.lang.String.java_class]).call(args[0]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == String && args[1].class == String && !block_given? && args[2] == 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(args[0],args[1]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == Fixnum && args[1].class == String && args[2].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(args[0],args[1],args[2]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling put(#{args[0]},#{args[1]},#{args[2]})" end end |
- (::VertxWebClient::HttpRequest) putAbs(absoluteURI)
120 121 122 123 124 125 126 127 128 129 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 120 def put_abs(*args) if args[0].class == String && !block_given? return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:putAbs, [Java::java.lang.String.java_class]).call(args[0]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling put_abs(#{args[0]})" end end |
- (::VertxWebClient::HttpRequest) raw(customHttpMethod, requestURI) - (::VertxWebClient::HttpRequest) raw(customHttpMethod, host, requestURI) - (::VertxWebClient::HttpRequest) raw(customHttpMethod, port, host, requestURI)
144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 144 def raw(*args) if args[0].class == String && args[1].class == String && !block_given? && args[2] == nil && args[3] == 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(args[0],args[1]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == String && args[1].class == String && args[2].class == String && !block_given? && args[3] == 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(args[0],args[1],args[2]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == String && args[1].class == Fixnum && args[2].class == String && args[3].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(args[0],args[1],args[2],args[3]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling raw(#{args[0]},#{args[1]},#{args[2]},#{args[3]})" end end |
- (::VertxWebClient::HttpRequest) rawAbs(customHttpMethod, absoluteURI)
404 405 406 407 408 409 410 411 412 413 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 404 def raw_abs(*args) if args[0].class == String && args[1].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(args[0],args[1]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling raw_abs(#{args[0]},#{args[1]})" end 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.
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 91 def request(*args) if args[0].class == Symbol && args[1].class == String && !block_given? && args[2] == nil && args[3] == nil && args[4] == 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(args[0].to_s),args[1]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == Symbol && args[1].class == Hash && !block_given? && args[2] == nil && args[3] == nil && args[4] == 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(args[0].to_s),Java::IoVertxCoreHttp::RequestOptions.new(::Vertx::Util::Utils.to_json_object(args[1]))),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == Symbol && args[1].class == String && args[2].class == String && !block_given? && args[3] == nil && args[4] == 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(args[0].to_s),args[1],args[2]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == Symbol && args[1].class.method_defined?(:j_del) && args[2].class == String && !block_given? && args[3] == nil && args[4] == 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(args[0].to_s),args[1].j_del,args[2]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == Symbol && args[1].class.method_defined?(:j_del) && args[2].class == Hash && !block_given? && args[3] == nil && args[4] == 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(args[0].to_s),args[1].j_del,Java::IoVertxCoreHttp::RequestOptions.new(::Vertx::Util::Utils.to_json_object(args[2]))),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == Symbol && args[1].class == Fixnum && args[2].class == String && args[3].class == String && !block_given? && args[4] == 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(args[0].to_s),args[1],args[2],args[3]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == Symbol && args[1].class.method_defined?(:j_del) && args[2].class == String && args[3].class == String && !block_given? && args[4] == 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(args[0].to_s),args[1].j_del,args[2],args[3]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == Symbol && args[1].class.method_defined?(:j_del) && args[2].class == Fixnum && args[3].class == String && args[4].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(args[0].to_s),args[1].j_del,args[2],args[3],args[4]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling request(#{args[0]},#{args[1]},#{args[2]},#{args[3]},#{args[4]})" end 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.
327 328 329 330 331 332 333 334 335 336 337 338 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client.rb', line 327 def request_abs(*args) if args[0].class == Symbol && args[1].class == String && !block_given? && args[2] == 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(args[0].to_s),args[1]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) elsif args[0].class == Symbol && args[1].class.method_defined?(:j_del) && args[2].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(args[0].to_s),args[1].j_del,args[2]),::VertxWebClient::HttpRequest,::Vertx::Buffer.j_api_type) end if defined?(super) super else raise ArgumentError, "Invalid arguments when calling request_abs(#{args[0]},#{args[1]},#{args[2]})" end end |