Class: Archaeo::HttpClient::Response
- Inherits:
-
Object
- Object
- Archaeo::HttpClient::Response
- Defined in:
- lib/archaeo/http_client.rb
Overview
HTTP response with status code, headers (lowercase keys), and body.
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status:, headers:, body:) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(status:, headers:, body:) ⇒ Response
Returns a new instance of Response.
51 52 53 54 55 |
# File 'lib/archaeo/http_client.rb', line 51 def initialize(status:, headers:, body:) @status = status @headers = headers @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
49 50 51 |
# File 'lib/archaeo/http_client.rb', line 49 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
49 50 51 |
# File 'lib/archaeo/http_client.rb', line 49 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
49 50 51 |
# File 'lib/archaeo/http_client.rb', line 49 def status @status end |