Open Duckwhale opened 1 year ago
After looking at the NodeJS code, it seems that porting their WHATWG URL module directly might be more trouble than it's worth:
All in all, this will be more work than originally anticipated. Instead, there may be some alternatives worth considering:
Lastly, I wonder how important having this module right now actually is. I want to get to WebSockets ASAP and having some basic HTTP functionality, just enough to complete the handshake really, might be enough even if the implementation isn't a fully spec-compliant HTTP server (or client, for that matter). So, perhaps shelving this until later is the better approach here.
Can probably port the one from NodeJS: https://nodejs.org/api/url.html#the-whatwg-url-api
Source: https://github.com/nodejs/node/blob/v19.3.0/lib/url.js
Some of the more esoteric features (internationalization) may not be very useful here. I'm mostly interested in the test cases, really.
Roadmap:
Required for #137