| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent afb9534 commit 6293aea
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3234,6 +3234,25 @@ deprecated: v13.0.0 | |||
| 3234 | 3234 | ||
| 3235 | 3235 | See [`response.socket`][]. | |
| 3236 | 3236 | ||
| 3237 | + #### `response.createPushResponse(headers, callback)` | ||
| 3238 | + <!-- YAML | ||
| 3239 | + added: v8.4.0 | ||
| 3240 | + --> | ||
| 3241 | + | ||
| 3242 | + * `headers` {HTTP/2 Headers Object} An object describing the headers | ||
| 3243 | + * `callback` {Function} Called once `http2stream.pushStream()` is finished, | ||
| 3244 | + or either when the attempt to create the pushed `Http2Stream` has failed or | ||
| 3245 | + has been rejected, or the state of `Http2ServerRequest` is closed prior to | ||
| 3246 | + calling the `http2stream.pushStream()` method | ||
| 3247 | + * `err` {Error} | ||
| 3248 | + * `res` {http2.Http2ServerResponse} The newly-created `Http2ServerResponse` | ||
| 3249 | + object | ||
| 3250 | + | ||
| 3251 | + Call [`http2stream.pushStream()`][] with the given headers, and wrap the | ||
| 3252 | + given [`Http2Stream`][] on a newly created `Http2ServerResponse` as the callback | ||
| 3253 | + parameter if successful. When `Http2ServerRequest` is closed, the callback is | ||
| 3254 | + called with an error `ERR_HTTP2_INVALID_STREAM`. | ||
| 3255 | + | ||
| 3237 | 3256 | #### `response.end([data[, encoding]][, callback])` | |
| 3238 | 3257 | <!-- YAML | |
| 3239 | 3258 | added: v8.4.0 | |
@@ -3631,25 +3650,6 @@ const server = http2.createServer((req, res) => { | |||
| 3631 | 3650 | Attempting to set a header field name or value that contains invalid characters | |
| 3632 | 3651 | will result in a [`TypeError`][] being thrown. | |
| 3633 | 3652 | ||
| 3634 | - #### `response.createPushResponse(headers, callback)` | ||
| 3635 | - <!-- YAML | ||
| 3636 | - added: v8.4.0 | ||
| 3637 | - --> | ||
| 3638 | - | ||
| 3639 | - * `headers` {HTTP/2 Headers Object} An object describing the headers | ||
| 3640 | - * `callback` {Function} Called once `http2stream.pushStream()` is finished, | ||
| 3641 | - or either when the attempt to create the pushed `Http2Stream` has failed or | ||
| 3642 | - has been rejected, or the state of `Http2ServerRequest` is closed prior to | ||
| 3643 | - calling the `http2stream.pushStream()` method | ||
| 3644 | - * `err` {Error} | ||
| 3645 | - * `res` {http2.Http2ServerResponse} The newly-created `Http2ServerResponse` | ||
| 3646 | - object | ||
| 3647 | - | ||
| 3648 | - Call [`http2stream.pushStream()`][] with the given headers, and wrap the | ||
| 3649 | - given [`Http2Stream`][] on a newly created `Http2ServerResponse` as the callback | ||
| 3650 | - parameter if successful. When `Http2ServerRequest` is closed, the callback is | ||
| 3651 | - called with an error `ERR_HTTP2_INVALID_STREAM`. | ||
| 3652 | - | ||
| 3653 | 3653 | ## Collecting HTTP/2 performance metrics | |
| 3654 | 3654 | ||
| 3655 | 3655 | The [Performance Observer][] API can be used to collect basic performance | |
| Back | FazBrowse Home | New Git URL |
0 commit comments