Method: Mu::Curl::Verify::Response#initialize

Defined in:
lib/mu/curl/verify.rb

#initialize(json) ⇒ Response

Returns a new instance of Response.



49
50
51
52
53
54
55
56
57
# File 'lib/mu/curl/verify.rb', line 49

def initialize json
    rs = Request.parse json['bytes'][1]['data']
    @line = rs[:line]
    _, @status, @message = rs[:line].split(/\s+/, 3)
    @status = @status.to_i
    @content = rs[:content]
    @headers = Hash.new
    rs[:headers].each { |h| @headers[h[:key]] = h[:val] }
end