Class: Seahorse::Client::Http::Response
- Inherits:
-
Object
- Object
- Seahorse::Client::Http::Response
- Defined in:
- lib/seahorse/client/http/response.rb
Instance Attribute Summary collapse
- #body ⇒ IO
- #headers ⇒ Headers
-
#status_code ⇒ Integer
Returns ‘0` if the request failed to generate any response.
Instance Method Summary collapse
- #body_contents ⇒ String
-
#initialize(options = {}) ⇒ Response
constructor
A new instance of Response.
Constructor Details
Instance Attribute Details
#body ⇒ IO
23 24 25 |
# File 'lib/seahorse/client/http/response.rb', line 23 def body @body end |
#headers ⇒ Headers
20 21 22 |
# File 'lib/seahorse/client/http/response.rb', line 20 def headers @headers end |
#status_code ⇒ Integer
Returns ‘0` if the request failed to generate any response.
17 18 19 |
# File 'lib/seahorse/client/http/response.rb', line 17 def status_code @status_code end |
Instance Method Details
#body_contents ⇒ String
35 36 37 38 39 40 |
# File 'lib/seahorse/client/http/response.rb', line 35 def body_contents body.rewind contents = body.read body.rewind contents end |