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.



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

#bodyObject (readonly)

Returns the value of attribute body.



46
47
48
# File 'lib/archaeo/http_client.rb', line 46

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



46
47
48
# File 'lib/archaeo/http_client.rb', line 46

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



46
47
48
# File 'lib/archaeo/http_client.rb', line 46

def status
  @status
end