Class: Gonebusy::HttpResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/gonebusy/http/http_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status_code, headers, raw_body) ⇒ HttpResponse

The constructor

Parameters:

  • The (Integer)

    status code returned by the server.

  • The (Hash)

    headers sent by the server in the response.

  • The (String)

    raw body of the response.



11
12
13
14
15
16
17
# File 'lib/gonebusy/http/http_response.rb', line 11

def initialize(status_code,
               headers,
               raw_body)
  @status_code = status_code
  @headers = headers
  @raw_body = raw_body
end

Instance Attribute Details

#headersObject

Returns the value of attribute headers.



5
6
7
# File 'lib/gonebusy/http/http_response.rb', line 5

def headers
  @headers
end

#raw_bodyObject

Returns the value of attribute raw_body.



5
6
7
# File 'lib/gonebusy/http/http_response.rb', line 5

def raw_body
  @raw_body
end

#status_codeObject

Returns the value of attribute status_code.



5
6
7
# File 'lib/gonebusy/http/http_response.rb', line 5

def status_code
  @status_code
end