diff options
author | Egor Pavlov <no.more.vikings@gmail.com> | 2020-01-10 21:06:18 +0300 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2020-01-13 11:45:55 +0300 |
commit | fff75645e9e9793397d89327c1bed87795ccb9b0 (patch) | |
tree | 8ab010b7ed3de7b74086aa3cea350b7d620c8f0e /doc/api/http.md | |
parent | c643e3b5720bf8e4cb098368d30c869e1fdf53a4 (diff) |
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>
Diffstat (limited to 'doc/api/http.md')
-rw-r--r-- | doc/api/http.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/api/http.md b/doc/api/http.md index 3ca76cc92a5..14b900ac55f 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -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', |