diff options
author | Rich Trott <rtrott@gmail.com> | 2020-08-28 17:54:03 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2020-08-30 18:35:58 +0300 |
commit | 07e7ad941bcf1b3b441ed0478381bee48339880c (patch) | |
tree | 6cba0e5af187d2ebaccdc687288657cdf52ed791 /doc/api/http2.md | |
parent | a1faa8d8521886c6a444ed2c6ba8cd735448bb8c (diff) |
doc: replace require() with reference links in http2.md
Refs: https://github.com/nodejs/node/pull/34929#discussion_r477101289
PR-URL: https://github.com/nodejs/node/pull/34956
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Diffstat (limited to 'doc/api/http2.md')
-rw-r--r-- | doc/api/http2.md | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/doc/api/http2.md b/doc/api/http2.md index 3a4f82bcc33..a44594ddc58 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -3142,12 +3142,11 @@ Then `request.url` will be: '/status?name=ryan' ``` -To parse the url into its parts, `require('url').parse(request.url)` -can be used: +To parse the url into its parts, [`url.parse(request.url)`][`url.parse()`]. ```console $ node -> require('url').parse('/status?name=ryan') +> url.parse('/status?name=ryan') Url { protocol: null, slashes: null, @@ -3164,12 +3163,12 @@ Url { ``` To obtain the parameters from the query string, use the -`require('querystring').parse()` function or pass -`true` as the second argument to `require('url').parse()`. +[`querystring.parse()`][] function or pass +`true` as the second argument to [`url.parse()`][]. ```console $ node -> require('url').parse('/status?name=ryan', true) +> url.parse('/status?name=ryan', true) Url { protocol: null, slashes: null, @@ -3767,6 +3766,7 @@ you need to implement any fall-back behaviour yourself. [`net.Socket.prototype.unref()`]: net.html#net_socket_unref [`net.Socket`]: net.html#net_class_net_socket [`net.connect()`]: net.html#net_net_connect +[`querystring.parse()`]: querystring.html#querystring_querystring_parse_str_sep_eq_options [`request.authority`]: #http2_request_authority [`request.socket`]: #http2_request_socket [`request.socket.getPeerCertificate()`]: tls.html#tls_tlssocket_getpeercertificate_detailed @@ -3782,6 +3782,7 @@ you need to implement any fall-back behaviour yourself. [`tls.TLSSocket`]: tls.html#tls_class_tls_tlssocket [`tls.connect()`]: tls.html#tls_tls_connect_options_callback [`tls.createServer()`]: tls.html#tls_tls_createserver_options_secureconnectionlistener +[`url.parse()`]: url.html#url_url_parse_urlstring_parsequerystring_slashesdenotehost [`writable.writableFinished`]: stream.html#stream_writable_writablefinished [error code]: #error_codes [Sensitive headers]: #http2-sensitive-headers |