Class: Async::HTTP::Response
- Inherits:
-
Struct
- Object
- Struct
- Async::HTTP::Response
- Includes:
- BufferedBody::Reader
- Defined in:
- lib/async/http/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
Methods included from BufferedBody::Reader
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body
25 26 27 |
# File 'lib/async/http/response.rb', line 25 def body @body end |
#headers ⇒ Object
Returns the value of attribute headers
25 26 27 |
# File 'lib/async/http/response.rb', line 25 def headers @headers end |
#reason ⇒ Object
Returns the value of attribute reason
25 26 27 |
# File 'lib/async/http/response.rb', line 25 def reason @reason end |
#status ⇒ Object
Returns the value of attribute status
25 26 27 |
# File 'lib/async/http/response.rb', line 25 def status @status end |
#version ⇒ Object
Returns the value of attribute version
25 26 27 |
# File 'lib/async/http/response.rb', line 25 def version @version end |
Instance Method Details
#continue? ⇒ Boolean
26 27 28 |
# File 'lib/async/http/response.rb', line 26 def continue? status == 100 end |
#failure? ⇒ Boolean
38 39 40 |
# File 'lib/async/http/response.rb', line 38 def failure? status >= 400 && status < 600 end |
#redirection? ⇒ Boolean
34 35 36 |
# File 'lib/async/http/response.rb', line 34 def redirection? status >= 300 && status < 400 end |
#success? ⇒ Boolean
30 31 32 |
# File 'lib/async/http/response.rb', line 30 def success? status >= 200 && status < 300 end |