Skip to content

Add request data sent and response data received diagnostic channels #4166

Closed
@legendecas

Description

@legendecas

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 parameters request, chunk,
  • undici:request:receivedDataChunk with parameters request, 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions