class Faraday::Adapter::SemaphoreNetHttp

Public Instance Methods

net_http_connection(env) click to toggle source
Calls superclass method
# File lib/ext/faraday.rb, line 4
def net_http_connection(env)
  connections = (Thread.current[:net_http_connections] ||= {})
  env_key = [env.url.host, env.url.port, env.ssl.verify]
  connections[env_key] ||= begin
                             super(env).tap { |connection|
                               # uncomment to enable Net::HTTP debugging
                               # connection.set_debug_output($stderr)
                               connection.use_ssl = true
                               connection.start
                             }
                           end
end