Class: Vertx::HttpClientResponse
- Inherits:
-
Object
- Object
- Vertx::HttpClientResponse
- Includes:
- ReadStream
- Defined in:
- src/main/api_shim/core/http.rb
Overview
Encapsulates a client-side HTTP response.
An instance of this class is provided to the user via a handler that was specified when one of the
HTTP method operations, or the generic Vertx::HttpClient#request method was called on an instance of HttpClient.
Instance Method Summary (collapse)
-
- (Object) body_handler(&hndlr)
Set a handler to receive the entire body in one go - do not use this for large bodies.
-
- (Object) cookies
Get all cookies.
-
- (String) header(key)
Get a header value.
-
- (MultiMap) headers
Get all the headers in the response.
-
- (FixNum) status_code
The HTTP status code of the response.
-
- (String) status_message
The status message.
-
- (MultiMap) trailers
Get all the trailers in the response.
Methods included from ReadStream
#data_handler, #end_handler, #exception_handler, #pause, #resume
Instance Method Details
- (Object) body_handler(&hndlr)
Set a handler to receive the entire body in one go - do not use this for large bodies
496 497 498 499 |
# File 'src/main/api_shim/core/http.rb', line 496 def body_handler(&hndlr) @j_del.bodyHandler(hndlr) self end |
- (Object) cookies
Get all cookies
488 489 490 491 492 493 |
# File 'src/main/api_shim/core/http.rb', line 488 def if ! = @j_del. end end |
- (String) header(key)
Get a header value
465 466 467 |
# File 'src/main/api_shim/core/http.rb', line 465 def header(key) @j_del.getHeader(key) end |
- (MultiMap) headers
Get all the headers in the response.
471 472 473 474 475 476 |
# File 'src/main/api_shim/core/http.rb', line 471 def headers if !@headers @headers = MultiMap.new(@j_del.headers) end @headers end |
- (FixNum) status_code
The HTTP status code of the response.
453 454 455 |
# File 'src/main/api_shim/core/http.rb', line 453 def status_code @j_del.statusCode end |
- (String) status_message
The status message
458 459 460 |
# File 'src/main/api_shim/core/http.rb', line 458 def @j_del.statusMessage end |
- (MultiMap) trailers
Get all the trailers in the response.
480 481 482 483 484 485 |
# File 'src/main/api_shim/core/http.rb', line 480 def trailers if !@trailers @trailers = MultiMap.new(@j_del.trailers) end @trailers end |