lib/acme/client/resources/directory.rb in acme-client-2.0.13 vs lib/acme/client/resources/directory.rb in acme-client-2.0.14

- old
+ new

@@ -66,15 +66,10 @@ raise Acme::Client::Error::InvalidDirectory, "Invalid directory url\n#{@directory} did not return a valid directory\n#{exception.inspect}" end def fetch_directory - connection = Faraday.new(url: @directory, **@connection_options) do |configuration| - configuration.use Acme::Client::FaradayMiddleware, client: nil, mode: nil - - configuration.adapter Faraday.default_adapter - end - connection.headers[:user_agent] = Acme::Client::USER_AGENT - response = connection.get(@url) + http_client = Acme::Client::HTTPClient.new_acme_connection(url: @directory, options: @connection_options, client: nil, mode: nil) + response = http_client.get(@url) response.body end end