question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

request.headers() does not give all headers that are used when making the request

See original GitHub issue
const 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:

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:16
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
dilamecommented, Aug 13, 2020

Any updates on this?

3reactions
a10kilohamcommented, Sep 22, 2022

not stale, still

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found