Closed
Description
This would solve...
This will allow Node.js network inspector to monitor request data and response data on Chrome DevTools frontend.
The implementation should look like...
undici:request:sentDataChunk
with parametersrequest, chunk
,undici:request:receivedDataChunk
with parametersrequest, response, chunk
.
Essentially, the diag channels shall expose request
objects to allow subscribers to identify which request sent/received the data chunk.
I have also considered...
Monkey patching Request.onBodySent
and Request.onData
to intercept data chunks. The Request
object is exposed with undici:request:created
diag channel so it is possible to intercept data chunks with monkey patching.
Additional context
Refs: nodejs/node#53946