feat(network): add request.waitForPostBody() for asynchronously reported bodies#41888
feat(network): add request.waitForPostBody() for asynchronously reported bodies#41888yury-s wants to merge 2 commits into
Conversation
Network.requestWillBeSent does not include post data entries when the request body is not available synchronously (e.g. a Blob or File body), only hasPostData is set. Retrieve the body via Network.getRequestPostData in that case, deferring the request events until the body is fetched. Fixes: microsoft#6479
…ted bodies Instead of deferring request dispatch while the body is fetched via Network.getRequestPostData, dispatch the request right away and push the body to the client once it is available. New request.waitForPostBody() resolves when the body has been reported by the browser. Fixes: microsoft#6479
Test results for "MCP"1 failed 7759 passed, 1249 skipped Merge workflow run. |
|
Hi, I'm the Playwright bot and I took a look at the CI failures here. 🟢 The one failure is a pre-existing flake — this PR is clear
DetailsOverall: 1 failed, 7759 passed. The single failure is unrelated to the diff and has a long flake history, so I don't see any CI signal attributable to this PR. Pre-existing flake / infra
Triaged by the Playwright bot - agent run |
Test results for "tests 1"3 flaky50025 passed, 1193 skipped Merge workflow run. |
Summary
hasPostDatafor Blob/File request bodies inNetwork.requestWillBeSent; fetch the body viaNetwork.getRequestPostDataand push it to the client asynchronouslyrequest.waitForPostBody()resolves once the body has been reported; syncpostData()/postDataBuffer()also return it after that pointFixes #6479