Exception: Flexirest::HTTPException
- Inherits:
-
RequestException
- Object
- StandardError
- RequestException
- Flexirest::HTTPException
- Defined in:
- lib/flexirest/request.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#request_url ⇒ Object
Returns the value of attribute request_url.
-
#result ⇒ Object
Returns the value of attribute result.
-
#status ⇒ Object
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(options) ⇒ HTTPException
constructor
A new instance of HTTPException.
- #message ⇒ Object
Constructor Details
#initialize(options) ⇒ HTTPException
Returns a new instance of HTTPException.
809 810 811 812 813 814 815 |
# File 'lib/flexirest/request.rb', line 809 def initialize() @status = [:status] @result = [:result] @request_url = [:url] @raw_response = [:raw_response] @method = [:method] end |
Instance Attribute Details
#request_url ⇒ Object
Returns the value of attribute request_url.
808 809 810 |
# File 'lib/flexirest/request.rb', line 808 def request_url @request_url end |
#result ⇒ Object
Returns the value of attribute result.
808 809 810 |
# File 'lib/flexirest/request.rb', line 808 def result @result end |
#status ⇒ Object
Returns the value of attribute status.
808 809 810 |
# File 'lib/flexirest/request.rb', line 808 def status @status end |
Instance Method Details
#message ⇒ Object
817 818 819 820 |
# File 'lib/flexirest/request.rb', line 817 def method = @method.try(:upcase) "Sending #{method} to '#{@request_url}' returned a #{@status} with the body of - #{@raw_response}" end |