simple-get icon indicating copy to clipboard operation
simple-get copied to clipboard

Remove require('url') in favor of URL

Open feross opened this issue 6 years ago • 2 comments

(Once we're ready to drop Node 8 support)

For: https://github.com/brave/brave-browser/issues/5490

feross avatar Aug 07 '19 01:08 feross

It doesn't seem viable without support for relative URLs.

Relative URLs are currently used for the redirect logic and parsed from the Location header so we will have to wait for https://github.com/nodejs/node/pull/28482 to land but it requires Node 12.x — which is likely a leap too far.

https://github.com/nodejs/node/issues/12682 https://github.com/whatwg/url/issues/421

gillesdemey avatar Oct 06 '19 21:10 gillesdemey

It's possible to do new URL('...', 'http://example.com') to parse a relative URL.

feross avatar Oct 06 '19 22:10 feross