mattsse / chromiumoxide

Chrome Devtools Protocol rust API
Apache License 2.0
755 stars 78 forks source link

Respond to intercepted request #117

Closed Sytten closed 1 year ago

Sytten commented 1 year ago

While I can get the events with let stream = page.event_listener::<EventRequestWillBeSent>().await?;, I don't think there is a way to respond to the request?

On puppeteer I would do:

page.on("request", interceptedRequest => {
    interceptedRequest.respond({
      body: `<h1>Test</h1>`
    });
});