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 <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Jul 16, 2020
1 parent a2dd258 commit 326b854
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
Original file line number Diff line number Diff line change
Expand Up @@ -2098,8 +2098,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
Original file line number Diff line number Diff line change
Expand Up @@ -3028,8 +3028,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 @@ -3043,7 +3042,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 326b854

Please sign in to comment.