title: How can I log the body of the response of a network request using puppeteer?
body: <p>I am trying to make it log the data found from inspect&gt;network&gt;preview but right now it logs inspect&gt;network&gt;headers.
  Here is what I have:</p>
  <pre><code>    const puppeteer = require(&quot;puppeteer&quot;);
      
      const url =
        &quot;https://www.google.com/&quot;;
      
      async function StartScraping() {
        await puppeteer
          .launch({
            headless: false,
          })
          .then(async (browser) =&gt; {
            const page = await browser.newPage();
      
            await page.setViewport({
              width: 1500,
              height: 800,
            });
      
            page.on(&quot;response&quot;, async (response) =&gt; {
      
      
              if (response.url().includes(&quot;Text&quot;)) {
                  console.log(await response);
                }
      
            });
      
            await page.goto(url, {
              waitUntil: &quot;load&quot;,
              timeout: 0,
            });
          });
      }
      StartScraping();
  </code></pre>