Skip to content

Commit

Permalink
doc: remove parenthetical \r\n comment in http and http2 docs
Browse files Browse the repository at this point in the history
The explanation that the HTTP requests include `\r\n` is true but not
important or relevant in these two specific contexts.

PR-URL: #34178
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
  • Loading branch information
Trott committed Jul 4, 2020
1 parent 21005c3 commit 56dbe46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions doc/api/http.md
Expand Up @@ -2101,8 +2101,7 @@ added: v0.1.90
**Only valid for request obtained from [`http.Server`][].**

Request URL string. This contains only the URL that is present in the actual
HTTP request. If the request is (remember, each header line ends with `\r\n`
plus a final `\r\n` after the last one indicating the end of the header):
HTTP request. Take the following request:

```http
GET /status?name=ryan HTTP/1.1
Expand Down
5 changes: 2 additions & 3 deletions doc/api/http2.md
Expand Up @@ -3034,8 +3034,7 @@ added: v8.4.0
* {string}

Request URL string. This contains only the URL that is present in the actual
HTTP request. If the request is (remember, each header line ends with `\r\n`
plus a final `\r\n` after the last one indicating the end of the header):
HTTP request. If the request is:

```http
GET /status?name=ryan HTTP/1.1
Expand All @@ -3049,7 +3048,7 @@ Then `request.url` will be:
'/status?name=ryan'
```

To parse the url into its parts `require('url').parse(request.url)`
To parse the url into its parts, `require('url').parse(request.url)`
can be used:

```console
Expand Down

0 comments on commit 56dbe46

Please sign in to comment.