[Feature]: add async `request.body()`
🚀 Feature Request
Fetching body is an async command in Bidi and it is a regret that in our current API request.postData is synchronous. Let's align with response and have async getter for the request body.
Example
No response
Motivation
Improve API.
@hbenl heads-up, we are likely to release the new API in 1.57 and it can be employed in Bidi.
Unfortunately the new API was reverted in https://github.com/microsoft/playwright/pull/38281 as we couldn't find a single use that it was fixing in Playwright today. I tried switching to Network.getRequestPostData in Chromium in hope that it would fix the problem for blob/file requests or multipart uploads, but unfortunately it doesn't. We can reconsider adding the async APIs if it fixes some of the scenarios, but looks like this needs to be fixed on Chromium/WebKit side first.
@yury-s could you maybe shed some light on which fixes it needs for Chromium/WebKit? Are there an issue that we can block this issue on? Also do you think it is something that could be done soon? Thanks!