Method: HTTPX::HTTPError#initialize
- Defined in:
- lib/httpx/errors.rb
#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 |