Exception: HTTParty::ResponseError Abstract

Inherits:
StandardError
  • Object
show all
Defined in:
lib/httparty/exceptions.rb

Overview

This class is abstract.

Exceptions which inherit from ResponseError contain the Net::HTTP

response object accessible via the #response method.

Direct Known Subclasses

RedirectionTooDeep

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ResponseError

Instantiate an instance of ResponseError with a Net::HTTPResponse object

Parameters:

  • (Net::HTTPResponse)


18
19
20
# File 'lib/httparty/exceptions.rb', line 18

def initialize(response)
  @response = response
end

Instance Attribute Details

#responseNet::HTTPResponse (readonly)

Returns the response of the last request Net::HTTPOK

Returns:

  • (Net::HTTPResponse)

    A subclass of Net::HTTPResponse, e.g.



14
15
16
# File 'lib/httparty/exceptions.rb', line 14

def response
  @response
end