Open mmastrac opened 9 months ago
Agreed we need to make a decision on this. From what I see in that WhatWG thread it seems there isn't consensus on how to fit it into the url standard (though I did mainly skim read it).
I think we can go ahead and allow for flexibility here and just say that in connect(destination)
, the destination
MAY be an absolute URL string, and that if it is, it is up to the host implementation to determine if the URL scheme is supported or not.
This would be helpful, btw, if we do end up supporting SNI and ALPN as discussed in other issues. For instance,
connect('https://example.org')
could automatically set secureTransport: 'on'
, set the SNI to 'example.org'
, and configure the ALPN for h1
, etc.
Deno currently provides the ability to connect to a unix socket. While I believe there is no standard for unix socket addresses URIs, a few ad-hoc standards do exist for this. Ideally the connection standard should make it reasonably easy for implementers to provide additional platform-specific socket types.
Some discussion around this in WhatWG: https://github.com/whatwg/url/issues/577