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.
66 67 68 69 |
# File 'lib/httpx/errors.rb', line 66 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.
64 65 66 |
# File 'lib/httpx/errors.rb', line 64 def response @response end |
Instance Method Details
#status ⇒ Object
71 72 73 |
# File 'lib/httpx/errors.rb', line 71 def status @response.status end |