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.
55 56 57 58 59 |
# File 'lib/archaeo/http_client.rb', line 55 def initialize(status:, headers:, body:) @status = status @headers = headers @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
53 54 55 |
# File 'lib/archaeo/http_client.rb', line 53 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
53 54 55 |
# File 'lib/archaeo/http_client.rb', line 53 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
53 54 55 |
# File 'lib/archaeo/http_client.rb', line 53 def status @status end |