Class: Hypernova::FaradayConnection

Inherits:
Object
  • Object
show all
Defined in:
lib/hypernova/faraday_connection.rb

Class Method Summary collapse

Class Method Details

.buildObject



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/hypernova/faraday_connection.rb', line 5

def self.build
  configuration = Hypernova.configuration
  Faraday.new(
    request: {
      open_timeout: configuration.open_timeout,
      timeout: configuration.timeout,
    },
    url: Hypernova::BatchUrlBuilder.base_url,
  ) do |builder|
    builder.adapter(configuration.http_adapter) if configuration.http_adapter
  end
end