Class: Sydecar::FileConnection

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

Class Method Summary collapse

Methods inherited from BaseConnection

common_headers

Class Method Details

.headersObject



4
5
6
7
8
9
# File 'lib/sydecar/file_connection.rb', line 4

def headers
  common_headers.merge(
    'Content-Type' => 'multipart/form-data',
    'Accept' => '*/*'
  )
end

.instanceObject



11
12
13
14
15
16
# File 'lib/sydecar/file_connection.rb', line 11

def instance
  super
  return @@instance if @@instance

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