Method: CoreLibrary::HttpClientConfiguration#clone_with

Defined in:
lib/apimatic-core/http/configurations/http_client_configuration.rb

#clone_with(http_callback: nil) ⇒ Object



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/apimatic-core/http/configurations/http_client_configuration.rb', line 47

def clone_with(http_callback: nil)
  HttpClientConfiguration.new(
    connection: DeepCloneUtils.deep_copy(@connection),
    adapter: DeepCloneUtils.deep_copy(@adapter),
    timeout: @timeout,
    max_retries: @max_retries,
    retry_interval: @retry_interval,
    backoff_factor: @backoff_factor,
    retry_statuses: DeepCloneUtils.deep_copy(@retry_statuses),
    retry_methods: DeepCloneUtils.deep_copy(@retry_methods),
    cache: @cache,
    verify: @verify,
    http_callback: http_callback || DeepCloneUtils.deep_copy(@http_callback),
    http_client: DeepCloneUtils.deep_copy(@http_client),
    logging_configuration: DeepCloneUtils.deep_copy(@logging_configuration)
  )
end