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 authored and addaleax committed Sep 22, 2020
1 parent 9bb70a4 commit c62941e
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 @@ -1983,8 +1983,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 @@ -2988,8 +2988,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 @@ -3003,7 +3002,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 c62941e

Please sign in to comment.