Class: Lapse::Transport::HTTP::Response
- Inherits:
-
Object
- Object
- Lapse::Transport::HTTP::Response
- Defined in:
- lib/lapse/transport/http.rb
Overview
Response class responsible for deserializing API calls
Instance Attribute Summary collapse
-
#body ⇒ Object
The parsed response.
-
#headers ⇒ Hash
HTTP headers returned as part of the response.
Instance Method Summary collapse
-
#initialize(http_response, result_format = :mashie) ⇒ Response
constructor
Initializes a new result.
Constructor Details
#initialize(http_response, result_format = :mashie) ⇒ Response
Initializes a new result
133 134 135 136 137 |
# File 'lib/lapse/transport/http.rb', line 133 def initialize(http_response, result_format = :mashie) @result_format = result_format @headers = parse_headers(http_response.to_hash) @body = parse_body(http_response.body) end |
Instance Attribute Details
#body ⇒ Object
The parsed response
127 128 129 |
# File 'lib/lapse/transport/http.rb', line 127 def body @body end |
#headers ⇒ Hash
HTTP headers returned as part of the response
127 128 129 |
# File 'lib/lapse/transport/http.rb', line 127 def headers @headers end |