@@ -2213,7 +2213,7 @@ Emitted when the buffer of the message is free again.
2213
2213
added: v0.1.17
2214
2214
-->
2215
2215
2216
- Emitted when transmission is finished successfully.
2216
+ Emitted when the transmission is finished successfully.
2217
2217
2218
2218
### Event: ` prefinish `
2219
2219
<!-- YAML
@@ -2234,9 +2234,9 @@ added: v0.3.0
2234
2234
Adds HTTP trailers (headers but at the end of the message) to the message.
2235
2235
2236
2236
Trailers are ** only** be emitted if the message is chunked encoded. If not,
2237
- trailer will be silently discarded.
2237
+ the trailer will be silently discarded.
2238
2238
2239
- HTTP requires the ` Trailer ` header to be sent in order to emit trailers,
2239
+ HTTP requires the ` Trailer ` header to be sent to emit trailers,
2240
2240
with a list of header fields in its value, e.g.
2241
2241
2242
2242
``` js
@@ -2325,8 +2325,8 @@ added: v0.4.0
2325
2325
* ` name ` {string} Name of header
2326
2326
* Returns {string | undefined}
2327
2327
2328
- Gets value of HTTP header with given name. If such name doesn't exist in
2329
- message, it will be ` undefined ` .
2328
+ Gets the value of HTTP header with the given name. If such a name doesn't
2329
+ exist in message, it will be ` undefined ` .
2330
2330
2331
2331
### ` outgoingMessage.getHeaderNames() `
2332
2332
<!-- YAML
@@ -2347,7 +2347,7 @@ added: v8.0.0
2347
2347
2348
2348
Returns a shallow copy of the current outgoing headers. Since a shallow
2349
2349
copy is used, array values may be mutated without additional calls to
2350
- various header-related http module methods. The keys of the returned
2350
+ various header-related HTTP module methods. The keys of the returned
2351
2351
object are the header names and the values are the respective header
2352
2352
values. All header names are lowercase.
2353
2353
@@ -2400,7 +2400,7 @@ Since `OutgoingMessage` should be a write-only stream,
2400
2400
call this function will throw an ` Error ` . Thus, it disabled the pipe method
2401
2401
it inherits from ` Stream ` .
2402
2402
2403
- User should not call this function directly.
2403
+ The User should not call this function directly.
2404
2404
2405
2405
### ` outgoingMessage.removeHeader() `
2406
2406
<!-- YAML
@@ -2422,7 +2422,7 @@ added: v0.4.0
2422
2422
* ` value ` {string} Header value
2423
2423
* Returns: {this}
2424
2424
2425
- Sets a single header value for header object.
2425
+ Sets a single header value for the header object.
2426
2426
2427
2427
### ` outgoingMessage.setTimeout(msesc[, callback]) `
2428
2428
<!-- YAML
@@ -2444,7 +2444,7 @@ added: v0.3.0
2444
2444
2445
2445
* {stream.Duplex}
2446
2446
2447
- Reference to the underlying socket. Usually users will not want to access
2447
+ Reference to the underlying socket. Usually, users will not want to access
2448
2448
this property.
2449
2449
2450
2450
After calling ` outgoingMessage.end() ` , this property will be nulled.
@@ -2497,8 +2497,8 @@ This `outgoingMessage.writableHighWaterMark` will be the `highWaterMark` of
2497
2497
underlying socket if socket exists. Else, it would be the default
2498
2498
` highWaterMark ` .
2499
2499
2500
- ` highWaterMark ` is the maximum amount of data which can be potentially
2501
- buffered by socket.
2500
+ ` highWaterMark ` is the maximum amount of data that can be potentially
2501
+ buffered by the socket.
2502
2502
2503
2503
### ` outgoingMessage.writableLength `
2504
2504
<!-- YAML
@@ -2532,11 +2532,11 @@ changes:
2532
2532
* ` callback ` {Function}
2533
2533
* Returns {boolean}
2534
2534
2535
- If this method is called and header is not sent, it will call
2535
+ If this method is called and the header is not sent, it will call
2536
2536
` this._implicitHeader ` to flush implicit header.
2537
2537
If the message should not have a body (indicated by ` this._hasBody ` ),
2538
2538
the call is ignored and ` chunk ` will not be sent. It could be useful
2539
- when handling particular message which must not include a body.
2539
+ when handling a particular message which must not include a body.
2540
2540
e.g. response to ` HEAD ` request, ` 204 ` and ` 304 ` response.
2541
2541
2542
2542
` chunk ` can be a string or a buffer. When ` chunk ` is a string, the
@@ -2545,21 +2545,21 @@ e.g. response to `HEAD` request, `204` and `304` response.
2545
2545
2546
2546
If the message is transferred in chucked encoding
2547
2547
(indicated by ` this.chunkedEncoding ` ), ` chunk ` will be flushed as
2548
- one chunk among a stream of chunks. Otherwise, it will be flushed as body
2549
- of message.
2548
+ one chunk among a stream of chunks. Otherwise, it will be flushed as the
2549
+ body of message.
2550
2550
2551
- This method handles the raw body of HTTP message and has nothing to do with
2552
- higher-level multi-part body encodings that may be used.
2551
+ This method handles the raw body of the HTTP message and has nothing to do
2552
+ with higher-level multi-part body encodings that may be used.
2553
2553
2554
2554
If it is the first call to this method of a message, it will send the
2555
2555
buffered header first, then flush the the ` chunk ` as described above.
2556
2556
2557
- The second and successive calls to this method, it will assume the data
2558
- will streamed and send the new data separately. It means that the response
2557
+ The second and successive calls to this method will assume the data
2558
+ will be streamed and send the new data separately. It means that the response
2559
2559
is buffered up to the first chunk of the body.
2560
2560
2561
2561
Returns ` true ` if the entire data was flushed successfully to the kernel
2562
- buffer. Returns ` false ` if all or part of the data was queued in user
2562
+ buffer. Returns ` false ` if all or part of the data was queued in the user
2563
2563
memory. Event ` drain ` will be emitted when the buffer is free again.
2564
2564
2565
2565
## ` http.METHODS `
0 commit comments