Skip to content

[docs] decision: network responses expose their original body and request timing#17674

Open
AutomatedTester wants to merge 1 commit into
trunkfrom
adr-bidi-network-body-timing
Open

[docs] decision: network responses expose their original body and request timing#17674
AutomatedTester wants to merge 1 commit into
trunkfrom
adr-bidi-network-body-timing

Conversation

@AutomatedTester

Copy link
Copy Markdown
Member

💥 What does this PR do?

Proposes a design decision record: network responses expose their original body and request timing.

The high-level network handlers can mutate/stub traffic but can't read the original response body or expose request timing — the two most common monitoring needs. Both are now supported by BiDi: network.addDataCollector + network.getData capture response (and increasingly request) bodies, and FetchTimingInfo (13 fields) already rides on every request. This record proposes body()/text()/json() and fetch-then-patch on the Response wrapper (via managed data collectors) plus timing on the Request wrapper. Because data collectors are newer and unevenly implemented across browsers, body-read raises a typed "unsupported" error with a capability gate rather than failing silently; timing is always available.

🔧 Implementation Notes

🤖 AI assistance

  • AI assisted (complete below)
    • Tool(s): Claude Code
    • What was generated: Initial draft of the decision record, derived from a CDDL-validated comparison of the Python BiDi surface against Playwright, plus a check of browser support for data collectors; revised through discussion and review
    • I reviewed all AI output and can explain the change

💡 Additional Considerations

One of a set of BiDi ergonomics decision records proposed together. Cross-binding convergence is tracked in the binding-status table.

🔄 Types of changes

  • Documentation (design decision record)

@AutomatedTester AutomatedTester force-pushed the adr-bidi-network-body-timing branch from 883901e to 9114a9a Compare June 11, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant