Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3fe9293

Browse filesBrowse files
MaleDongBethGriggs
authored andcommitted
doc: make createPushResponse() more detailled
We don't know what will return when successful or failure for the callback of the function. So this commit makes it more detailled. Backport-PR-URL: #22850 PR-URL: #22366 Refs: #22322 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 348cde0 commit 3fe9293
Copy full SHA for 3fe9293

File tree

Expand file treeCollapse file tree

1 file changed

+11
-5
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-5
lines changed
Open diff view settings
Collapse file

‎doc/api/http2.md‎

Copy file name to clipboardExpand all lines: doc/api/http2.md
+11-5Lines changed: 11 additions & 5 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -3146,12 +3146,18 @@ will result in a [`TypeError`][] being thrown.
31463146
<!-- YAML
31473147
added: v8.4.0
31483148
-->
3149+
* `headers` {HTTP/2 Headers Object} An object describing the headers
3150+
* `callback` {Function} Called once `http2stream.pushStream()` is finished,
3151+
or either when the attempt to create the pushed `Http2Stream` has failed or
3152+
has been rejected, or the state of `Http2ServerRequest` is closed prior to
3153+
calling the `http2stream.pushStream()` method
3154+
* `err` {Error}
3155+
* `stream` {ServerHttp2Stream} The newly-created `ServerHttp2Stream` object
31493156

3150-
Call [`http2stream.pushStream()`][] with the given headers, and wraps the
3151-
given newly created [`Http2Stream`] on `Http2ServerResponse`.
3152-
3153-
The callback will be called with an error with code `ERR_HTTP2_INVALID_STREAM`
3154-
if the stream is closed.
3157+
Call [`http2stream.pushStream()`][] with the given headers, and wrap the
3158+
given [`Http2Stream`] on a newly created `Http2ServerResponse` as the callback
3159+
parameter if successful. When `Http2ServerRequest` is closed, the callback is
3160+
called with an error `ERR_HTTP2_INVALID_STREAM`.
31553161

31563162
## Collecting HTTP/2 Performance Metrics
31573163

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.