Method: GoodData::Rest::Connection#initialize

Defined in:
lib/gooddata/rest/connection.rb

#initialize(opts) ⇒ Connection

Returns a new instance of Connection.



159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/gooddata/rest/connection.rb', line 159

def initialize(opts)
  super()
  @stats = ThreadSafe::Hash.new
  @execution_id = opts[:execution_id]

  headers = opts[:headers] || {}
  @webdav_headers = DEFAULT_WEBDAV_HEADERS.merge(headers)

  @user = nil
  @server = nil
  @opts = opts
  @verify_ssl = @opts[:verify_ssl] == false || @opts[:verify_ssl] == OpenSSL::SSL::VERIFY_NONE ? OpenSSL::SSL::VERIFY_NONE : OpenSSL::SSL::VERIFY_PEER

  # Initialize headers
  reset_headers!

  @at_exit_handler_installed = nil
end