class IDRAC::Client
def handle_response(response)
def handle_response(response) # First see if there is a location header if response.headers["location"] return handle_location(response.headers["location"]) end # If there is no location header, check the status code if response.status.between?(200, 299) return response.body else raise Error, "Failed to #{response.status} - #{response.body}" end end