Exception: QcloudCos::Http::ResponseCodeError
- Defined in:
- lib/qcloud_cos/http.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
Returns the value of attribute body.
-
#code ⇒ Object
Returns the value of attribute code.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ ResponseCodeError
constructor
A new instance of ResponseCodeError.
Constructor Details
#initialize(response) ⇒ ResponseCodeError
Returns a new instance of ResponseCodeError.
66 67 68 69 70 71 |
# File 'lib/qcloud_cos/http.rb', line 66 def initialize(response) @response = response @code = response.code.to_i @body = response.body super("Wrong response code with code=#{code} and body=#{body}") end |
Instance Attribute Details
#body ⇒ Object
Returns the value of attribute body.
65 66 67 |
# File 'lib/qcloud_cos/http.rb', line 65 def body @body end |
#code ⇒ Object
Returns the value of attribute code.
65 66 67 |
# File 'lib/qcloud_cos/http.rb', line 65 def code @code end |
#response ⇒ Object
Returns the value of attribute response.
65 66 67 |
# File 'lib/qcloud_cos/http.rb', line 65 def response @response end |