Skip to content
Permalink
Browse files

doc: remove "note that" from http.md

Refs: nodejs/remark-preset-lint-node#16

PR-URL: #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>
  • Loading branch information...
Trott authored and targos committed Jun 20, 2019
1 parent f0a857f commit 3174bc14a240d5c36a67b2766fbc120e9c2b65ac
Showing with 14 additions and 14 deletions.
  1. +14 −14 doc/api/http.md
@@ -624,7 +624,7 @@ added: v1.6.0
* `name` {string}
* 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
[`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
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.

### 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
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.

### Event: 'clientError'
@@ -939,7 +939,7 @@ added: v0.1.0
* `request` {http.IncomingMessage}
* `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).

### Event: 'upgrade'
@@ -1118,7 +1118,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
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.,

```js
@@ -1184,7 +1184,7 @@ added: v0.4.0
* Returns: {any}

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()`][].

```js
@@ -1252,7 +1252,7 @@ added: v7.7.0
* Returns: {boolean}

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
const hasContentType = response.hasHeader('content-type');
@@ -1435,7 +1435,7 @@ it will switch to implicit header mode and flush the implicit headers.
This sends a chunk of the response body. This method may
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
_must not_ include a message body.

@@ -1528,11 +1528,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.
If the body contains higher coded characters then `Buffer.byteLength()`
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.

Attempting to set a header field name or value that contains invalid characters
@@ -1687,7 +1687,7 @@ added: v0.11.6

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
odd-numbered offsets are the associated values.

@@ -1908,7 +1908,7 @@ changes:
Since most requests are GET requests without bodies, Node.js provides this
convenience method. The only difference between this method and
[`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.

The `callback` is invoked with a single argument that is an instance of
@@ -2083,7 +2083,7 @@ req.write(postData);
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 -
even if there is no data being written to the request body.

@@ -2157,7 +2157,7 @@ will be emitted in the following order:
* `'end'` 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.

[`--http-server-default-timeout`]: cli.html#cli_http_server_default_timeout_milliseconds

0 comments on commit 3174bc1

Please sign in to comment.
You can’t perform that action at this time.