Not sure if a bug or I'm doing something wrong, but the following code (amended the URLs) results in

Not sure if a bug or I'm doing something wrong, but the following code (amended the URLs) results in Buffer is not defined, which is a bit odd (same for .text() and .json()):

const [res] = await Promise.all([
            page.waitForResponse(res => res.url().includes('something') && res.request().method().toUpperCase() != "OPTIONS"),
            page.goto('https://example.com', {waitUntil: "domcontentloaded"}),
        ]);

console.log(await res?.buffer())


Effectively I'm trying to extract data from a network request that's made during the second page load, and using pages.on was behaving very strangely so gave this a whirl instead
Was this page helpful?