Class: EventStoreClient::StoreAdapter::Api::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/event_store_client/store_adapter/api/connection.rb

Instance Method Summary collapse

Instance Method Details

#callObject



9
10
11
12
13
14
15
16
17
# File 'lib/event_store_client/store_adapter/api/connection.rb', line 9

def call
  Faraday.new(
    url: endpoint.url,
    headers: DEFAULT_HEADERS
  ) do |conn|
    conn.basic_auth(ENV['EVENT_STORE_USER'], ENV['EVENT_STORE_PASSWORD'])
    conn.adapter Faraday.default_adapter
  end
end