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
@liutc just advanced to level 1! Thanks for your contributions! 🎉
deep-jade•3y ago
This article should help https://docs.apify.com/academy/puppeteer-playwright/reading-intercepting-requests
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.