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.
46 47 48 49 |
# File 'lib/httpx/errors.rb', line 46 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.
44 45 46 |
# File 'lib/httpx/errors.rb', line 44 def response @response end |
Instance Method Details
#status ⇒ Object
51 52 53 |
# File 'lib/httpx/errors.rb', line 51 def status @response.status end |