mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
url: expose the WHATWG URL API globally
Install URL and URLSearchParams on the global object, like they can be found in browser environments. PR-URL: https://github.com/nodejs/node/pull/18281 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
@@ -242,8 +242,6 @@ const req = https.request(options, (res) => {
|
||||
Example using a [`URL`][] as `options`:
|
||||
|
||||
```js
|
||||
const { URL } = require('url');
|
||||
|
||||
const options = new URL('https://abc:xyz@example.com');
|
||||
|
||||
const req = https.request(options, (res) => {
|
||||
|
||||
Reference in New Issue
Block a user