class Async::HTTP::Endpoint
def initialize(url, endpoint = nil, **options)
(**alpn_protocols)-
the(Array(String)) -- alpn protocols to negotiate. -
the(OpenSSL::SSL::SSLContext) -- context to use for TLS. -
the(Integer) -- port to bind to, overrides the URL port. -
the(String) -- hostname to connect to (or bind to), overrides the URL hostname (used for SNI). -
the(String) -- scheme to use, overrides the URL scheme.
def initialize(url, endpoint = nil, **options) super(**options) raise ArgumentError, "URL must be absolute (include scheme, host): #{url}" unless url.absolute? @url = url if endpoint @endpoint = self.build_endpoint(endpoint) else @endpoint = nil end end