w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
378 stars 42 forks source link

Support getting response body for network requests #747

Open OrKoN opened 4 months ago

OrKoN commented 4 months ago

Issue https://github.com/w3c/webdriver-bidi/issues/541 asks for a mechanism to alter the response body when intercepting a request. This issue on the other hand is specifically about reading the body of network responses in responseCompleted events with or without the interception.

In Puppeteer, it is exposed via https://pptr.dev/api/puppeteer.httpresponse.buffer and https://pptr.dev/api/puppeteer.httpresponse.json

Probably adding support for fetching response bodies would require adding a new method and a way to deal with blobs in the protocol.