class Anthropic::Internal::Transport::PooledNetRequester

def connect(url)

Returns:
  • (Net::HTTP) -

Parameters:
  • url (URI::Generic) --

Other tags:
    Api: - private
def connect(url)
  port =
    case [url.port, url.scheme]
    in [Integer, _]
      url.port
    in [nil, "http" | "ws"]
      Net::HTTP.http_default_port
    in [nil, "https" | "wss"]
      Net::HTTP.https_default_port
    end
  Net::HTTP.new(url.host, port).tap do
    _1.use_ssl = %w[https wss].include?(url.scheme)
    _1.max_retries = 0
  end
end