Class: Sydecar::Connection

Inherits:
BaseConnection show all
Defined in:
lib/sydecar/connection.rb

Class Method Summary collapse

Methods inherited from BaseConnection

common_headers

Class Method Details

.headersObject



4
5
6
# File 'lib/sydecar/connection.rb', line 4

def headers
  common_headers.merge('Content-Type' => 'application/json')
end

.instanceObject



8
9
10
11
12
13
# File 'lib/sydecar/connection.rb', line 8

def instance
  super
  return @@instance if @@instance

  @@instance = create_instance(headers, base_url, env, format_of_request: :json)
end