| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ac64b4f commit 15023c7
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1199,6 +1199,10 @@ added: v8.4.0 | |||
| 1199 | 1199 | created stream is dependent on. | |
| 1200 | 1200 | * `callback` {Function} Callback that is called once the push stream has been | |
| 1201 | 1201 | initiated. | |
| 1202 | + * `err` {Error} | ||
| 1203 | + * `pushStream` {[`ServerHttp2Stream`][]} The returned pushStream object. | ||
| 1204 | + * `headers` {[Headers Object][]} Headers object the pushStream was initiated | ||
| 1205 | + with. | ||
| 1202 | 1206 | * Returns: {undefined} | |
| 1203 | 1207 | ||
| 1204 | 1208 | Initiates a push stream. The callback is invoked with the new `Http2Stream` | |
@@ -1210,7 +1214,7 @@ const http2 = require('http2'); | |||
| 1210 | 1214 | const server = http2.createServer(); | |
| 1211 | 1215 | server.on('stream', (stream) => { | |
| 1212 | 1216 | stream.respond({ ':status': 200 }); | |
| 1213 | - stream.pushStream({ ':path': '/' }, (err, pushStream) => { | ||
| 1217 | + stream.pushStream({ ':path': '/' }, (err, pushStream, headers) => { | ||
| 1214 | 1218 | if (err) throw err; | |
| 1215 | 1219 | pushStream.respond({ ':status': 200 }); | |
| 1216 | 1220 | pushStream.end('some pushed data'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments