doc: remove "note that" from http.md

Refs: https://github.com/nodejs/remark-preset-lint-node/pull/16

PR-URL: https://github.com/nodejs/node/pull/28329
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Rich Trott 2019-06-20 13:52:54 -06:00
parent 9af6d08a04
commit 46b686e329

View File

@ -624,7 +624,7 @@ added: v1.6.0
* `name` {string} * `name` {string}
* Returns: {any} * Returns: {any}
Reads out a header on the request. Note that the name is case insensitive. Reads out a header on the request. The name is case-insensitive.
The type of the return value depends on the arguments provided to The type of the return value depends on the arguments provided to
[`request.setHeader()`][]. [`request.setHeader()`][].
@ -810,7 +810,7 @@ client should continue to send the request body, or generating an appropriate
HTTP response (e.g. 400 Bad Request) if the client should not continue to send HTTP response (e.g. 400 Bad Request) if the client should not continue to send
the request body. the request body.
Note that when this event is emitted and handled, the [`'request'`][] event will When this event is emitted and handled, the [`'request'`][] event will
not be emitted. not be emitted.
### Event: 'checkExpectation' ### Event: 'checkExpectation'
@ -825,7 +825,7 @@ Emitted each time a request with an HTTP `Expect` header is received, where the
value is not `100-continue`. If this event is not listened for, the server will value is not `100-continue`. If this event is not listened for, the server will
automatically respond with a `417 Expectation Failed` as appropriate. automatically respond with a `417 Expectation Failed` as appropriate.
Note that when this event is emitted and handled, the [`'request'`][] event will When this event is emitted and handled, the [`'request'`][] event will
not be emitted. not be emitted.
### Event: 'clientError' ### Event: 'clientError'
@ -939,7 +939,7 @@ added: v0.1.0
* `request` {http.IncomingMessage} * `request` {http.IncomingMessage}
* `response` {http.ServerResponse} * `response` {http.ServerResponse}
Emitted each time there is a request. Note that there may be multiple requests Emitted each time there is a request. There may be multiple requests
per connection (in the case of HTTP Keep-Alive connections). per connection (in the case of HTTP Keep-Alive connections).
### Event: 'upgrade' ### Event: 'upgrade'
@ -1120,7 +1120,7 @@ Trailers will **only** be emitted if chunked encoding is used for the
response; if it is not (e.g. if the request was HTTP/1.0), they will response; if it is not (e.g. if the request was HTTP/1.0), they will
be silently discarded. be silently discarded.
Note that HTTP requires the `Trailer` header to be sent in order to HTTP requires the `Trailer` header to be sent in order to
emit trailers, with a list of the header fields in its value. E.g., emit trailers, with a list of the header fields in its value. E.g.,
```js ```js
@ -1186,7 +1186,7 @@ added: v0.4.0
* Returns: {any} * Returns: {any}
Reads out a header that's already been queued but not sent to the client. Reads out a header that's already been queued but not sent to the client.
Note that the name is case insensitive. The type of the return value depends The name is case-insensitive. The type of the return value depends
on the arguments provided to [`response.setHeader()`][]. on the arguments provided to [`response.setHeader()`][].
```js ```js
@ -1254,7 +1254,7 @@ added: v7.7.0
* Returns: {boolean} * Returns: {boolean}
Returns `true` if the header identified by `name` is currently set in the Returns `true` if the header identified by `name` is currently set in the
outgoing headers. Note that the header name matching is case-insensitive. outgoing headers. The header name matching is case-insensitive.
```js ```js
const hasContentType = response.hasHeader('content-type'); const hasContentType = response.hasHeader('content-type');
@ -1437,7 +1437,7 @@ it will switch to implicit header mode and flush the implicit headers.
This sends a chunk of the response body. This method may This sends a chunk of the response body. This method may
be called multiple times to provide successive parts of the body. be called multiple times to provide successive parts of the body.
Note that in the `http` module, the response body is omitted when the In the `http` module, the response body is omitted when the
request is a HEAD request. Similarly, the `204` and `304` responses request is a HEAD request. Similarly, the `204` and `304` responses
_must not_ include a message body. _must not_ include a message body.
@ -1530,11 +1530,11 @@ const server = http.createServer((req, res) => {
}); });
``` ```
Note that Content-Length is given in bytes not characters. The above example `Content-Length` is given in bytes not characters. The above example
works because the string `'hello world'` contains only single byte characters. works because the string `'hello world'` contains only single byte characters.
If the body contains higher coded characters then `Buffer.byteLength()` If the body contains higher coded characters then `Buffer.byteLength()`
should be used to determine the number of bytes in a given encoding. should be used to determine the number of bytes in a given encoding.
And Node.js does not check whether Content-Length and the length of the body And Node.js does not check whether `Content-Length` and the length of the body
which has been transmitted are equal or not. which has been transmitted are equal or not.
Attempting to set a header field name or value that contains invalid characters Attempting to set a header field name or value that contains invalid characters
@ -1689,7 +1689,7 @@ added: v0.11.6
The raw request/response headers list exactly as they were received. The raw request/response headers list exactly as they were received.
Note that the keys and values are in the same list. It is *not* a The keys and values are in the same list. It is *not* a
list of tuples. So, the even-numbered offsets are key values, and the list of tuples. So, the even-numbered offsets are key values, and the
odd-numbered offsets are the associated values. odd-numbered offsets are the associated values.
@ -1910,7 +1910,7 @@ changes:
Since most requests are GET requests without bodies, Node.js provides this Since most requests are GET requests without bodies, Node.js provides this
convenience method. The only difference between this method and convenience method. The only difference between this method and
[`http.request()`][] is that it sets the method to GET and calls `req.end()` [`http.request()`][] is that it sets the method to GET and calls `req.end()`
automatically. Note that the callback must take care to consume the response automatically. The callback must take care to consume the response
data for reasons stated in [`http.ClientRequest`][] section. data for reasons stated in [`http.ClientRequest`][] section.
The `callback` is invoked with a single argument that is an instance of The `callback` is invoked with a single argument that is an instance of
@ -2085,7 +2085,7 @@ req.write(postData);
req.end(); req.end();
``` ```
Note that in the example `req.end()` was called. With `http.request()` one In the example `req.end()` was called. With `http.request()` one
must always call `req.end()` to signify the end of the request - must always call `req.end()` to signify the end of the request -
even if there is no data being written to the request body. even if there is no data being written to the request body.
@ -2159,7 +2159,7 @@ will be emitted in the following order:
* `'end'` on the `res` object * `'end'` on the `res` object
* `'close'` on the `res` object * `'close'` on the `res` object
Note that setting the `timeout` option or using the `setTimeout()` function will Setting the `timeout` option or using the `setTimeout()` function will
not abort the request or do anything besides add a `'timeout'` event. not abort the request or do anything besides add a `'timeout'` event.
[`--max-http-header-size`]: cli.html#cli_max_http_header_size_size [`--max-http-header-size`]: cli.html#cli_max_http_header_size_size