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.
48 49 50 51 52 |
# File 'lib/archaeo/http_client.rb', line 48 def initialize(status:, headers:, body:) @status = status @headers = headers @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
46 47 48 |
# File 'lib/archaeo/http_client.rb', line 46 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
46 47 48 |
# File 'lib/archaeo/http_client.rb', line 46 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
46 47 48 |
# File 'lib/archaeo/http_client.rb', line 46 def status @status end |