Class: HTTPcap::Response
Overview
Response
Instance Attribute Summary collapse
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
Attributes inherited from Message
Instance Method Summary collapse
-
#initialize(data) ⇒ Response
constructor
A new instance of Response.
- #on_message_complete ⇒ Object
Methods inherited from Message
#on_body, #on_header_field, #on_header_value, #on_headers_complete, #on_url, #receive_data
Constructor Details
#initialize(data) ⇒ Response
Returns a new instance of Response.
10 11 12 13 14 |
# File 'lib/httpcap/response.rb', line 10 def initialize(data) @http_status = '' super(HTTP::Parser::TYPE_RESPONSE, data) end |
Instance Attribute Details
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
8 9 10 |
# File 'lib/httpcap/response.rb', line 8 def http_status @http_status end |
Instance Method Details
#on_message_complete ⇒ Object
16 17 18 |
# File 'lib/httpcap/response.rb', line 16 def @http_status = @parser.http_status end |