You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/api/http2.md
+14-37Lines changed: 14 additions & 37 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3142,46 +3142,25 @@ Then `request.url` will be:
3142
3142
'/status?name=ryan'
3143
3143
```
3144
3144
3145
-
To parse the url into its parts, [`url.parse(request.url)`][`url.parse()`].
3145
+
To parse the url into its parts, `new URL()` can be used:
3146
3146
3147
3147
```console
3148
3148
$ node
3149
-
> url.parse('/status?name=ryan')
3150
-
Url {
3151
-
protocol: null,
3152
-
slashes: null,
3153
-
auth: null,
3154
-
host: null,
3155
-
port: null,
3156
-
hostname: null,
3157
-
hash: null,
3158
-
search: '?name=ryan',
3159
-
query: 'name=ryan',
3149
+
> new URL('/status?name=ryan', 'http://example.com')
0 commit comments