request.headers() does not give all headers that are used when making the request
See original GitHub issueconst browser = await puppeteer.launch();
const page = await browser.newPage();
page.on('request', async (request) => {
await request.headers();
});
await page.goto('http://gajus.com');
just gives:
'upgrade-insecure-requests': '1',
'user-agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/79.0.3945.0 Safari/537.36',
'sec-fetch-user': '?1'
whereas the actual headers include additional headers such as: accept, accept-language and accept encoding.
Related:
- https://github.com/puppeteer/puppeteer/issues/3436 (closed without a solution)
Issue Analytics
- State:
- Created 4 years ago
- Reactions:16
- Comments:16 (1 by maintainers)
Top Results From Across the Web
HTTP headers - MDN Web Docs - Mozilla
Request headers contain more information about the resource to be fetched, or about the client requesting the resource. Response headers hold ...
Read more >Understanding REST Headers and Parameters - SoapUI
Headers are mostly classified as request headers and response headers, know the major request and response headers. You will have to set the...
Read more >Request Headers in the HTTP protocol - W3C
This request header is used with GET method to make it conditional: if the requested document has not changed since the time specified...
Read more >Using Axios to set request headers - LogRocket Blog
A key component of an HTTP request is the header. HTTP request headers are used to provide additional information about the request.
Read more >HTTP headers - GeeksforGeeks
The HTTP headers are used to pass additional information between the clients and the server through the request and response header. All the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any updates on this?
not stale, still