Exception: HTTPX::HTTPError
- Defined in:
- lib/httpx/errors.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ HTTPError
constructor
A new instance of HTTPError.
- #status ⇒ Object
Constructor Details
#initialize(response) ⇒ HTTPError
Returns a new instance of HTTPError.
64 65 66 67 |
# File 'lib/httpx/errors.rb', line 64 def initialize(response) @response = response super("HTTP Error: #{@response.status} #{@response.headers}\n#{@response.body}") end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
62 63 64 |
# File 'lib/httpx/errors.rb', line 62 def response @response end |
Instance Method Details
#status ⇒ Object
69 70 71 |
# File 'lib/httpx/errors.rb', line 69 def status @response.status end |