Class: Async::HTTP::Protocol::Response
- Inherits:
-
Struct
- Object
- Struct
- Async::HTTP::Protocol::Response
- Defined in:
- lib/async/http/protocol/response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#status ⇒ Object
Returns the value of attribute status.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body
24 25 26 |
# File 'lib/async/http/protocol/response.rb', line 24 def body @body end |
#headers ⇒ Object
Returns the value of attribute headers
24 25 26 |
# File 'lib/async/http/protocol/response.rb', line 24 def headers @headers end |
#reason ⇒ Object
Returns the value of attribute reason
24 25 26 |
# File 'lib/async/http/protocol/response.rb', line 24 def reason @reason end |
#status ⇒ Object
Returns the value of attribute status
24 25 26 |
# File 'lib/async/http/protocol/response.rb', line 24 def status @status end |
#version ⇒ Object
Returns the value of attribute version
24 25 26 |
# File 'lib/async/http/protocol/response.rb', line 24 def version @version end |
Instance Method Details
#continue? ⇒ Boolean
25 26 27 |
# File 'lib/async/http/protocol/response.rb', line 25 def continue? status == 100 end |
#failure? ⇒ Boolean
37 38 39 |
# File 'lib/async/http/protocol/response.rb', line 37 def failure? status >= 400 && status < 600 end |
#redirection? ⇒ Boolean
33 34 35 |
# File 'lib/async/http/protocol/response.rb', line 33 def redirection? status >= 300 && status < 400 end |
#success? ⇒ Boolean
29 30 31 |
# File 'lib/async/http/protocol/response.rb', line 29 def success? status >= 200 && status < 300 end |