lib/conjur/api/hosts.rb in conjur-api-2.0.1 vs lib/conjur/api/hosts.rb in conjur-api-2.1.0

- old
+ new

@@ -3,10 +3,10 @@ module Conjur class API class << self def enroll_host(url) if Conjur.log - logger << "Enrolling host with URL #{url}" + Conjur.log << "Enrolling host with URL #{url}\n" end require 'uri' url = URI.parse(url) if url.is_a?(String) response = Net::HTTP.get_response url raise "Host enrollment failed with status #{response.code} : #{response.body}" unless response.code.to_i == 200