Skip to content

Commit

Permalink
doc: clearify that http does chunked encoding itself
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine du Hamel <[email protected]>

PR-URL: #28379
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
micromaomao authored and danielleadams committed Jun 14, 2021
1 parent 92ed1c6 commit ed91379
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -1027,11 +1027,11 @@ added: v0.1.29
* `callback` {Function}
* Returns: {boolean}

Sends a chunk of the body. By calling this method
many times, a request body can be sent to a
server. In that case, it is suggested to use the
`['Transfer-Encoding', 'chunked']` header line when
creating the request.
Sends a chunk of the body. This method can be called multiple times. If no
`Content-Length` is set, data will automatically be encoded in HTTP Chunked
transfer encoding, so that server knows when the data ends. The
`Transfer-Encoding: chunked` header is added. Calling [`request.end()`][]
is necessary to finish sending the request.

The `encoding` argument is optional and only applies when `chunk` is a string.
Defaults to `'utf8'`.
Expand Down

0 comments on commit ed91379

Please sign in to comment.