Class: Response
- Inherits:
-
Object
- Object
- Response
- Defined in:
- lib/kirin_http/http_response.rb
Instance Method Summary collapse
-
#code ⇒ Integer
Returns the status code as integer.
-
#content ⇒ Object
Gets the content of the Http Request made.
-
#header ⇒ Hash
Returns the header as hash.
-
#initialize(content, headers, code) ⇒ Response
constructor
A new instance of Response.
Constructor Details
#initialize(content, headers, code) ⇒ Response
Returns a new instance of Response.
6 7 8 9 10 |
# File 'lib/kirin_http/http_response.rb', line 6 def initialize(content, headers, code) @content = content @header = headers @code = code end |
Instance Method Details
#code ⇒ Integer
Returns the status code as integer
30 31 32 |
# File 'lib/kirin_http/http_response.rb', line 30 def code @code end |
#content ⇒ Object
Gets the content of the Http Request made. This can be any type, please check headers for Content-Type to verify
16 17 18 |
# File 'lib/kirin_http/http_response.rb', line 16 def content @content end |
#header ⇒ Hash
Returns the header as hash
23 24 25 |
# File 'lib/kirin_http/http_response.rb', line 23 def header @header end |