http2.connect(authority[, options][, listener])
According to the HTTP2 spec:
The :authority pseudo-header field includes the authority portion of the target URI ([RFC3986], Section 3.2). The authority MUST NOT include the deprecated userinfo subcomponent for http or https schemed URIs.
authority = [ userinfo "@" ] host [ ":" port ]
So running http2.connect('google.com') should work, but it doesn't:
TypeError [ERR_INVALID_URL]: Invalid URL: google.com
I believe that it should be http2.connect(origin[, options][, listener]).
For example, url.origin returns protocol://authority.
http2.connect(authority[, options][, listener])According to the HTTP2 spec:
So running
http2.connect('google.com')should work, but it doesn't:I believe that it should be
http2.connect(origin[, options][, listener]).For example,
url.originreturnsprotocol://authority.