Class: EVSS::Letters::DownloadConfiguration

Inherits:
Configuration show all
Defined in:
lib/evss/letters/download_configuration.rb

Overview

Download configuration for EVSS::Letters

Instance Attribute Summary

Attributes inherited from Common::Client::Configuration::Base

#base_request_headers, #open_timeout, #read_timeout, #request_types, #user_agent

Instance Method Summary collapse

Methods inherited from Configuration

#base_path, #mock_enabled?, #service_name

Methods inherited from Configuration

#cert?, #client_cert, #client_key, #mock_enabled?, #root_ca, #set_evss_middlewares, #ssl_options

Methods inherited from Common::Client::Configuration::Base

#base_path, #breakers_error_threshold, #breakers_exception_handler, #breakers_matcher, #breakers_service, #create_new_breakers_service, #current_module, #request_options, #service_exception, #service_name

Instance Method Details

#connectionFaraday::Connection

the configuration set up in EVSS::Letters::Configuration

Returns:

  • (Faraday::Connection)

    A new Faraday connection object based on



15
16
17
18
19
20
21
22
23
24
# File 'lib/evss/letters/download_configuration.rb', line 15

def connection
  @conn ||= Faraday.new(base_path, request: request_options, ssl: ssl_options) do |faraday|
    faraday.use :breakers
    faraday.use EVSS::ErrorMiddleware
    faraday.use :immutable_headers

    faraday.response :betamocks if mock_enabled?
    faraday.adapter Faraday.default_adapter
  end
end