1
- # HTTP2
1
+ # HTTP/2
2
2
3
3
<!-- introduced_in=v8.4.0-->
4
4
@@ -230,7 +230,7 @@ added: v8.4.0
230
230
231
231
The ` 'stream' ` event is emitted when a new ` Http2Stream ` is created. When
232
232
invoked, the handler function will receive a reference to the ` Http2Stream `
233
- object, a [ HTTP2 Headers Object] [ ] , and numeric flags associated with the
233
+ object, a [ HTTP/2 Headers Object] [ ] , and numeric flags associated with the
234
234
creation of the stream.
235
235
236
236
``` js
@@ -383,7 +383,7 @@ Transmits a `GOAWAY` frame to the connected peer *without* shutting down the
383
383
added: v8.4.0
384
384
-->
385
385
386
- * Value: {HTTP2 Settings Object}
386
+ * Value: {HTTP/2 Settings Object}
387
387
388
388
A prototype-less object describing the current local settings of this
389
389
` Http2Session ` . The local settings are local to * this* ` Http2Session ` instance.
@@ -462,7 +462,7 @@ instance's underlying [`net.Socket`].
462
462
added: v8.4.0
463
463
-->
464
464
465
- * Value: {HTTP2 Settings Object}
465
+ * Value: {HTTP/2 Settings Object}
466
466
467
467
A prototype-less object describing the current remote settings of this
468
468
` Http2Session ` . The remote settings are set by the * connected* HTTP/2 peer.
@@ -533,8 +533,7 @@ An object describing the current status of this `Http2Session`.
533
533
added: v8.4.0
534
534
-->
535
535
536
- * ` settings ` {HTTP2 Settings Object}
537
- * Returns {undefined}
536
+ * ` settings ` {HTTP/2 Settings Object}
538
537
539
538
Updates the current local settings for this ` Http2Session ` and sends a new
540
539
` SETTINGS ` frame to the connected HTTP/2 peer.
@@ -674,7 +673,7 @@ client.on('altsvc', (alt, origin, streamId) => {
674
673
added: v8.4.0
675
674
-->
676
675
677
- * ` headers ` {HTTP2 Headers Object}
676
+ * ` headers ` {HTTP/2 Headers Object}
678
677
* ` options ` {Object}
679
678
* ` endStream ` {boolean} ` true ` if the ` Http2Stream ` * writable* side should
680
679
be closed initially, such as when sending a ` GET ` request that should not
@@ -862,7 +861,7 @@ added: v8.4.0
862
861
863
862
The ` 'trailers' ` event is emitted when a block of headers associated with
864
863
trailing header fields is received. The listener callback is passed the
865
- [ HTTP2 Headers Object] [ ] and flags associated with the headers.
864
+ [ HTTP/2 Headers Object] [ ] and flags associated with the headers.
866
865
867
866
``` js
868
867
stream .on (' trailers' , (headers , flags ) => {
@@ -961,7 +960,7 @@ calling `http2stream.close()`, or `http2stream.destroy()`. Will be
961
960
added: REPLACEME
962
961
-->
963
962
964
- * Value: {HTTP2 Headers Object}
963
+ * Value: {HTTP/2 Headers Object}
965
964
966
965
An object containing the outbound headers sent for this ` Http2Stream ` .
967
966
@@ -970,7 +969,7 @@ An object containing the outbound headers sent for this `Http2Stream`.
970
969
added: REPLACEME
971
970
-->
972
971
973
- * Value: {HTTP2 Headers Object[ ] }
972
+ * Value: {HTTP/2 Headers Object[ ] }
974
973
975
974
An array of objects containing the outbound informational (additional) headers
976
975
sent for this ` Http2Stream ` .
@@ -980,7 +979,7 @@ sent for this `Http2Stream`.
980
979
added: REPLACEME
981
980
-->
982
981
983
- * Value: {HTTP2 Headers Object}
982
+ * Value: {HTTP/2 Headers Object}
984
983
985
984
An object containing the outbound trailers sent for this this ` HttpStream ` .
986
985
@@ -1063,7 +1062,7 @@ added: v8.4.0
1063
1062
1064
1063
The ` 'headers' ` event is emitted when an additional block of headers is received
1065
1064
for a stream, such as when a block of ` 1xx ` informational headers is received.
1066
- The listener callback is passed the [ HTTP2 Headers Object] [ ] and flags
1065
+ The listener callback is passed the [ HTTP/2 Headers Object] [ ] and flags
1067
1066
associated with the headers.
1068
1067
1069
1068
``` js
@@ -1078,7 +1077,7 @@ added: v8.4.0
1078
1077
-->
1079
1078
1080
1079
The ` 'push' ` event is emitted when response headers for a Server Push stream
1081
- are received. The listener callback is passed the [ HTTP2 Headers Object] [ ] and
1080
+ are received. The listener callback is passed the [ HTTP/2 Headers Object] [ ] and
1082
1081
flags associated with the headers.
1083
1082
1084
1083
``` js
@@ -1095,7 +1094,7 @@ added: v8.4.0
1095
1094
The ` 'response' ` event is emitted when a response ` HEADERS ` frame has been
1096
1095
received for this stream from the connected HTTP/2 server. The listener is
1097
1096
invoked with two arguments: an Object containing the received
1098
- [ HTTP2 Headers Object] [ ] , and flags associated with the headers.
1097
+ [ HTTP/2 Headers Object] [ ] , and flags associated with the headers.
1099
1098
1100
1099
For example:
1101
1100
@@ -1125,8 +1124,7 @@ provide additional methods such as `http2stream.pushStream()` and
1125
1124
added: v8.4.0
1126
1125
-->
1127
1126
1128
- * ` headers ` {HTTP2 Headers Object}
1129
- * Returns: {undefined}
1127
+ * ` headers ` {HTTP/2 Headers Object}
1130
1128
1131
1129
Sends an additional informational ` HEADERS ` frame to the connected HTTP/2 peer.
1132
1130
@@ -1156,7 +1154,7 @@ accepts push streams, `false` otherwise. Settings are the same for every
1156
1154
added: v8.4.0
1157
1155
-->
1158
1156
1159
- * ` headers ` {HTTP2 Headers Object}
1157
+ * ` headers ` {HTTP/2 Headers Object}
1160
1158
* ` options ` {Object}
1161
1159
* ` exclusive ` {boolean} When ` true ` and ` parent ` identifies a parent Stream,
1162
1160
the created stream is made the sole direct dependency of the parent, with
@@ -1168,7 +1166,7 @@ added: v8.4.0
1168
1166
initiated.
1169
1167
* ` err ` {Error}
1170
1168
* ` pushStream ` {ServerHttp2Stream} The returned pushStream object.
1171
- * ` headers ` {HTTP2 Headers Object} Headers object the pushStream was
1169
+ * ` headers ` {HTTP/2 Headers Object} Headers object the pushStream was
1172
1170
initiated with.
1173
1171
* Returns: {undefined}
1174
1172
@@ -1199,7 +1197,7 @@ a `weight` value to `http2stream.priority` with the `silent` option set to
1199
1197
added: v8.4.0
1200
1198
-->
1201
1199
1202
- * ` headers ` {HTTP2 Headers Object}
1200
+ * ` headers ` {HTTP/2 Headers Object}
1203
1201
* ` options ` {Object}
1204
1202
* ` endStream ` {boolean} Set to ` true ` to indicate that the response will not
1205
1203
include payload data.
@@ -1245,7 +1243,7 @@ added: v8.4.0
1245
1243
-->
1246
1244
1247
1245
* ` fd ` {number} A readable file descriptor.
1248
- * ` headers ` {HTTP2 Headers Object}
1246
+ * ` headers ` {HTTP/2 Headers Object}
1249
1247
* ` options ` {Object}
1250
1248
* ` statCheck ` {Function}
1251
1249
* ` getTrailers ` {Function} Callback function invoked to collect trailer
@@ -1336,7 +1334,7 @@ added: v8.4.0
1336
1334
-->
1337
1335
1338
1336
* ` path ` {string|Buffer|URL}
1339
- * ` headers ` {HTTP2 Headers Object}
1337
+ * ` headers ` {HTTP/2 Headers Object}
1340
1338
* ` options ` {Object}
1341
1339
* ` statCheck ` {Function}
1342
1340
* ` onError ` {Function} Callback function invoked in the case of an
@@ -1712,7 +1710,7 @@ changes:
1712
1710
* ` selectPadding ` {Function} When ` options.paddingStrategy ` is equal to
1713
1711
` http2.constants.PADDING_STRATEGY_CALLBACK ` , provides the callback function
1714
1712
used to determine the padding. See [ Using options.selectPadding] [ ] .
1715
- * ` settings ` {HTTP2 Settings Object} The initial settings to send to the
1713
+ * ` settings ` {HTTP/2 Settings Object} The initial settings to send to the
1716
1714
remote peer upon connection.
1717
1715
* ` onRequestHandler ` {Function} See [ Compatibility API] [ ]
1718
1716
* Returns: {Http2Server}
@@ -1807,7 +1805,7 @@ changes:
1807
1805
* ` selectPadding ` {Function} When ` options.paddingStrategy ` is equal to
1808
1806
` http2.constants.PADDING_STRATEGY_CALLBACK ` , provides the callback function
1809
1807
used to determine the padding. See [ Using options.selectPadding] [ ] .
1810
- * ` settings ` {HTTP2 Settings Object} The initial settings to send to the
1808
+ * ` settings ` {HTTP/2 Settings Object} The initial settings to send to the
1811
1809
remote peer upon connection.
1812
1810
* ...: Any [ ` tls.createServer() ` ] [ ] options can be provided. For
1813
1811
servers, the identity options (` pfx ` or ` key ` /` cert ` ) are usually required.
@@ -1903,7 +1901,7 @@ changes:
1903
1901
* ` selectPadding ` {Function} When ` options.paddingStrategy ` is equal to
1904
1902
` http2.constants.PADDING_STRATEGY_CALLBACK ` , provides the callback function
1905
1903
used to determine the padding. See [ Using options.selectPadding] [ ] .
1906
- * ` settings ` {HTTP2 Settings Object} The initial settings to send to the
1904
+ * ` settings ` {HTTP/2 Settings Object} The initial settings to send to the
1907
1905
remote peer upon connection.
1908
1906
* ` createConnection ` {Function} An optional callback that receives the ` URL `
1909
1907
instance passed to ` connect ` and the ` options ` object, and returns any
@@ -1956,7 +1954,7 @@ a given number of milliseconds set using `http2server.setTimeout()`.
1956
1954
added: v8.4.0
1957
1955
-->
1958
1956
1959
- * Returns: {HTTP2 Settings Object}
1957
+ * Returns: {HTTP/2 Settings Object}
1960
1958
1961
1959
Returns an object containing the default settings for an ` Http2Session `
1962
1960
instance. This method returns a new object instance every time it is called
@@ -1967,7 +1965,7 @@ so instances returned may be safely modified for use.
1967
1965
added: v8.4.0
1968
1966
-->
1969
1967
1970
- * ` settings ` {HTTP2 Settings Object}
1968
+ * ` settings ` {HTTP/2 Settings Object}
1971
1969
* Returns: {Buffer}
1972
1970
1973
1971
Returns a ` Buffer ` instance containing serialized representation of the given
@@ -1989,9 +1987,9 @@ added: v8.4.0
1989
1987
-->
1990
1988
1991
1989
* ` buf ` {Buffer|Uint8Array} The packed settings.
1992
- * Returns: {HTTP2 Settings Object}
1990
+ * Returns: {HTTP/2 Settings Object}
1993
1991
1994
- Returns a [ HTTP2 Settings Object] [ ] containing the deserialized settings from
1992
+ Returns a [ HTTP/2 Settings Object] [ ] containing the deserialized settings from
1995
1993
the given ` Buffer ` as generated by ` http2.getPackedSettings() ` .
1996
1994
1997
1995
### Headers Object
@@ -2256,7 +2254,7 @@ In order to create a mixed [HTTPS][] and HTTP/2 server, refer to the
2256
2254
[ ALPN negotiation] [ ] section.
2257
2255
Upgrading from non-tls HTTP/1 servers is not supported.
2258
2256
2259
- The HTTP2 compatibility API is composed of [ ` Http2ServerRequest ` ] ( ) and
2257
+ The HTTP/2 compatibility API is composed of [ ` Http2ServerRequest ` ] ( ) and
2260
2258
[ ` Http2ServerResponse ` ] ( ) . They aim at API compatibility with HTTP/1, but
2261
2259
they do not hide the differences between the protocols. As an example,
2262
2260
the status message for HTTP codes is ignored.
@@ -2364,7 +2362,7 @@ Example:
2364
2362
console .log (request .headers );
2365
2363
```
2366
2364
2367
- See [ HTTP2 Headers Object] [ ] .
2365
+ See [ HTTP/2 Headers Object] [ ] .
2368
2366
2369
2367
* Note* : In HTTP/2, the request path, hostname, protocol, and method are
2370
2368
represented as special headers prefixed with the ` : ` character (e.g. ` ':path' ` ).
@@ -3087,8 +3085,8 @@ following additional properties:
3087
3085
[ HTTP/1 ] : http.html
3088
3086
[ HTTP/2 ] : https://tools.ietf.org/html/rfc7540
3089
3087
[ HTTP/2 Unencrypted ] : https://http2.github.io/faq/#does-http2-require-encryption
3090
- [ HTTP2 Headers Object] : #http2_headers_object
3091
- [ HTTP2 Settings Object] : #http2_settings_object
3088
+ [ HTTP/2 Headers Object] : #http2_headers_object
3089
+ [ HTTP/2 Settings Object] : #http2_settings_object
3092
3090
[ HTTPS ] : https.html
3093
3091
[ Http2Session and Sockets ] : #http2_http2session_and_sockets
3094
3092
[ Performance Observer ] : perf_hooks.html
0 commit comments