class Response
Public Class Methods
new(content, headers, code)
click to toggle source
@param [Object] content the body of the http request @param [Hash] headers the headers of the http request @param [Integer] code the status code of the http request
# File lib/kirin_http/http_response.rb, line 6 def initialize(content, headers, code) @content = content @header = headers @code = code end
Public Instance Methods
code()
click to toggle source
Returns the status code as integer
@return [Integer]
# File lib/kirin_http/http_response.rb, line 30 def code @code end
content()
click to toggle source
Gets the content of the Http Request made. This can be any type, please check headers for Content-Type to verify
@return [Object]
# File lib/kirin_http/http_response.rb, line 16 def content @content end
header()
click to toggle source
Returns the header as hash
@return [Hash]
# File lib/kirin_http/http_response.rb, line 23 def header @header end