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
@@ -3092,46 +3092,25 @@ Then `request.url` will be:
3092
3092
'/status?name=ryan'
3093
3093
```
3094
3094
3095
-
To parse the url into its parts, [`url.parse(request.url)`][`url.parse()`].
3095
+
To parse the url into its parts, `new URL()` can be used:
3096
3096
3097
3097
```console
3098
3098
$ node
3099
-
> url.parse('/status?name=ryan')
3100
-
Url {
3101
-
protocol: null,
3102
-
slashes: null,
3103
-
auth: null,
3104
-
host: null,
3105
-
port: null,
3106
-
hostname: null,
3107
-
hash: null,
3108
-
search: '?name=ryan',
3109
-
query: 'name=ryan',
3099
+
> new URL('/status?name=ryan', 'http://example.com')
0 commit comments