Class: VertxWebClient::WebClientSession
- Inherits:
-
WebClient
- Object
- WebClient
- VertxWebClient::WebClientSession
- Defined in:
- /Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb
Overview
An asynchronous sessions aware HTTP / HTTP/2 client called
WebClientSession.
This client wraps a WebClient and makes it session aware adding features to it:
- Per client headers, to be send with every request
- Per client cookies, to be send with every request
- Automatic storage and sending of cookies received from the server(s)
The client honors the cookies attributes:
- domain
- path
- secure
- max-age and expires
Constant Summary
- @@j_api_type =
Object.new
Class Method Summary (collapse)
- + (Boolean) accept?(obj)
-
+ (::VertxWebClient::WebClientSession) create(webClient = nil)
Create a session aware web client using the provided webClient instance.
- + (Object) j_api_type
- + (Object) j_class
- + (Object) unwrap(obj)
- + (Object) wrap(obj)
Instance Method Summary (collapse)
-
- (self) add_header(name = nil, value = nil)
Configure the client to add an HTTP header to every request.
-
- (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.
-
- (self) remove_header(name = nil)
Removes a previously added header.
-
- (::VertxWebClient::HttpRequest) request(param_1 = nil, param_2 = nil, param_3 = nil, param_4 = nil, param_5 = nil)
Like VertxWebClient::WebClient#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 VertxWebClient::WebClient#request_abs using the serverAddress parameter to connect to the server instead of the absoluteURI parameter.
Class Method Details
+ (Boolean) accept?(obj)
37 38 39 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 37 def @@j_api_type.accept?(obj) obj.class == WebClientSession end |
+ (::VertxWebClient::WebClientSession) create(webClient = nil)
Create a session aware web client using the provided
webClient instance.
368 369 370 371 372 373 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 368 def self.create(webClient=nil) if webClient.class.method_defined?(:j_del) && !block_given? return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebClient::WebClientSession.java_method(:create, [Java::IoVertxExtWebClient::WebClient.java_class]).call(webClient.j_del),::VertxWebClient::WebClientSession) end raise ArgumentError, "Invalid arguments when calling create(#{webClient})" end |
+ (Object) j_api_type
46 47 48 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 46 def self.j_api_type @@j_api_type end |
+ (Object) j_class
49 50 51 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 49 def self.j_class Java::IoVertxExtWebClient::WebClientSession.java_class end |
+ (Object) unwrap(obj)
43 44 45 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 43 def @@j_api_type.unwrap(obj) obj.j_del end |
+ (Object) wrap(obj)
40 41 42 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 40 def @@j_api_type.wrap(obj) WebClientSession.new(obj) end |
Instance Method Details
- (self) add_header(name = nil, value = nil)
Configure the client to add an HTTP header to every request.
378 379 380 381 382 383 384 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 378 def add_header(name=nil,value=nil) if name.class == String && value.class == String && !block_given? @j_del.java_method(:addHeader, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(name,value) return self end raise ArgumentError, "Invalid arguments when calling add_header(#{name},#{value})" end |
- (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.
359 360 361 362 363 364 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 359 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.
239 240 241 242 243 244 245 246 247 248 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 239 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
253 254 255 256 257 258 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 253 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.
146 147 148 149 150 151 152 153 154 155 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 146 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
160 161 162 163 164 165 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 160 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.
301 302 303 304 305 306 307 308 309 310 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 301 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
315 316 317 318 319 320 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 315 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.
270 271 272 273 274 275 276 277 278 279 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 270 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
284 285 286 287 288 289 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 284 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.
177 178 179 180 181 182 183 184 185 186 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 177 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
191 192 193 194 195 196 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 191 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.
208 209 210 211 212 213 214 215 216 217 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 208 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
222 223 224 225 226 227 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 222 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.
335 336 337 338 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_session.rb', line 335 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
350 351 352 353 354 355 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 350 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 |
- (self) remove_header(name = nil)
Removes a previously added header.
388 389 390 391 392 393 394 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 388 def remove_header(name=nil) if name.class == String && !block_given? @j_del.java_method(:removeHeader, [Java::java.lang.String.java_class]).call(name) return self end raise ArgumentError, "Invalid arguments when calling remove_header(#{name})" 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 VertxWebClient::WebClient#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.
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 93 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 VertxWebClient::WebClient#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.
127 128 129 130 131 132 133 134 |
# File '/Users/julien/java/vertx-aggregator/modules/vertx-lang-ruby/vertx-lang-ruby/target/classes/vertx-web-client/web_client_session.rb', line 127 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 |