Class: Archaeo::HttpClient::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/archaeo/http_client.rb

Overview

HTTP response with status code, headers (lowercase keys), and body.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject (readonly)

Returns the value of attribute body.



49
50
51
# File 'lib/archaeo/http_client.rb', line 49

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



49
50
51
# File 'lib/archaeo/http_client.rb', line 49

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



49
50
51
# File 'lib/archaeo/http_client.rb', line 49

def status
  @status
end