* When a chunk of the response body has been received, cache it until `getResponseBody` request * https://chromedevtools.github.io/devtools-protocol/1-3/Network/#method-getResponseBody or * stream it with `streamResourceContent` request. * https://chromedevtools.github.io/devtools-protocol/tot/Ne
({ request, chunk })
| 178 | * @param {{ request: undici.Request, chunk: Uint8Array | string }} event |
| 179 | */ |
| 180 | function onClientRequestBodyChunkReceived({ request, chunk }) { |
| 181 | if (typeof request[kInspectorRequestId] !== 'string') { |
| 182 | return; |
| 183 | } |
| 184 | |
| 185 | Network.dataReceived({ |
| 186 | requestId: request[kInspectorRequestId], |
| 187 | timestamp: getMonotonicTime(), |
| 188 | dataLength: chunk.byteLength, |
| 189 | encodedDataLength: chunk.byteLength, |
| 190 | data: chunk, |
| 191 | }); |
| 192 | } |
| 193 | |
| 194 | /** |
| 195 | * When a response is completed, emit Network.loadingFinished event. |
nothing calls this directly
no test coverage detected