I'm trying to get ALL request headers to properly inspect the request, but it only returns headers like the User-Agent and Origin, while the original request contains a lot more headers.
Is there a way of actually getting all the headers?
For reference, here's the code:
const puppeteer = require('puppeteer');
const browser = await puppeteer.launch({
headless: false
});
const page = await browser.newPage();
page.on('request', req => {
console.log(req.headers());
});
await page.goto('https://reddit.com');
Thanks in advance, iLinked
U can use the url https://headers.cloxy.net/request.php to see your headers
await page.goto('https://headers.cloxy.net/request.php');
U can also print to log
console.log((await page.goto('https://example.org/')).request().headers());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With