Puppeteer - Intercept request, modify its response body and respond() with the modified body.

Has anyone done it in Puppeteer? With Playwright its quite straightforward but Im not able to get the response with Puppeteer in the request interception.
2 Replies
MEE6
MEE6•3y ago
@liutc just advanced to level 1! Thanks for your contributions! 🎉
deep-jade
deep-jade•3y ago
IV - Reading & intercepting requests | Apify Documentation
You can use DevTools, but did you know that you can do all the same stuff (plus more) programmatically? Read and intercept requests in Puppeteer/Playwright.

Did you find this page helpful?