class Async::HTTP::Endpoint
def self.for(scheme, hostname, path = "/", **options)
@parameter hostname [String] The hostname to connect to (or bind to).
@parameter scheme [String] The scheme to use, e.g. "http" or "https".
Construct an endpoint with a specified scheme, hostname, optional path, and options.
def self.for(scheme, hostname, path = "/", **options) # TODO: Consider using URI.for once it becomes available: uri_klass = SCHEMES.fetch(scheme.downcase) do raise ArgumentError, "Unsupported scheme: #{scheme.inspect}" end self.new( uri_klass.new(scheme, nil, hostname, nil, nil, path, nil, nil, nil).normalize, **options ) end