lib/harvestdor/purl_xml.rb in harvestdor-0.3.0 vs lib/harvestdor/purl_xml.rb in harvestdor-0.3.1

- old
+ new

@@ -1,6 +1,7 @@ require 'nokogiri' +require 'net/http/persistent' module Harvestdor # Mixin: code to retrieve Purl public xml pieces RDF_NAMESPACE = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' @@ -135,13 +136,13 @@ else raise "expected String or Nokogiri::XML::Document for first argument, got #{object.class}" end pub_xml_ng_doc end - + def self.http_client @http_client ||= Faraday.new do |conn| - conn.adapter Faraday.default_adapter + conn.adapter :net_http_persistent conn.use Faraday::Response::RaiseError conn.request :retry, max: 5, interval: 0.05, interval_randomness: 0.5, backoff_factor: 2, \ No newline at end of file