mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feef2a300e
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
311 B
311 B
Network logging
By default, Puppeteer listens for all network requests and responses and emits network events on the page.
const page = await browser.newPage();
page.on('request', request => {
console.log(request.url());
});
page.on('response', response => {
console.log(response.url());
});