Method: DecisionReview::PdfValidation::Configuration#connection
- Defined in:
- lib/decision_review/utilities/pdf_validation/configuration.rb
#connection ⇒ Faraday::Connection
Creates the a connection with parsing json and adding breakers functionality.
38 39 40 41 42 43 44 45 46 47 |
# File 'lib/decision_review/utilities/pdf_validation/configuration.rb', line 38 def connection @conn ||= Faraday.new(base_path, headers: base_request_headers, request: ) do |faraday| faraday.use :breakers faraday.use Faraday::Response::RaiseError faraday.response :betamocks if mock_enabled? faraday.response :json faraday.adapter Faraday.default_adapter end end |