mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: fix example of parsing request.url
PR-URL: https://github.com/nodejs/node/pull/31302 Fixes: https://github.com/nodejs/node/issues/31301 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
committed by
Ruben Bridgewater
parent
c643e3b572
commit
fff75645e9
@@ -1990,7 +1990,7 @@ When `request.url` is `'/status?name=ryan'` and
|
||||
|
||||
```console
|
||||
$ node
|
||||
> new URL(request.url, request.headers.host)
|
||||
> new URL(request.url, `http://${request.headers.host}`)
|
||||
URL {
|
||||
href: 'http://localhost:3000/status?name=ryan',
|
||||
origin: 'http://localhost:3000',
|
||||
|
||||
Reference in New Issue
Block a user