Class: Gitlab::HTTPConnectionAdapter

Inherits:
HTTParty::ConnectionAdapter
  • Object
show all
Extended by:
Utils::Override
Defined in:
lib/gitlab/http_connection_adapter.rb

Instance Method Summary collapse

Methods included from Utils::Override

extended, extensions, included, method_added, override, prepended, queue_verification, verify!

Instance Method Details

#connectionObject


26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/gitlab/http_connection_adapter.rb', line 26

def connection
  @uri, hostname = validate_url!(uri)

  http = super
  http.hostname_override = hostname if hostname

  gitlab_http = Gitlab::NetHttpAdapter.new(http.address, http.port)

  http.instance_variables.each do |variable|
    gitlab_http.instance_variable_set(variable, http.instance_variable_get(variable))
  end

  gitlab_http
end