class HTTParty::Request
def handle_response(response)
def handle_response(response) case response when Net::HTTPRedirection options[:limit] -= 1 self.path = response['location'] @redirect = true perform else parsed_response = parse_response(response.body) Response.new(parsed_response, response.body, response.code, response.to_hash) end end