In Files

  • lib/restclient/exceptions.rb

RestClient::ExceptionWithResponse

Base RestClient exception when there’s a response available

Attributes

response[RW]

Public Class Methods

new(response=nil) click to toggle source
 
               # File lib/restclient/exceptions.rb, line 14
def initialize(response=nil)
        @response = response
end
            

Public Instance Methods

http_body() click to toggle source
 
               # File lib/restclient/exceptions.rb, line 22
def http_body
        RestClient::Request.decode(@response['content-encoding'], @response.body) if @response
end
            
http_code() click to toggle source
 
               # File lib/restclient/exceptions.rb, line 18
def http_code
        @response.code.to_i if @response
end