Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

202
Views
How to rewrite puppeteer request header in case sensitive?

I try to rewrite the Header below:

await page.setExtraHTTPHeaders({
  "Accept-Language": "en-US;q=0.7",
});

However, when I inspect the network in Chrome, the request header is accept-language instead.

I expect it to be Accept-Language.

Any advice? Thanks.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I manage to work around with interception of the request like below:

await page.setRequestInterception(true);
page.on("request", request => {
  // Override headers
  const headers = Object.assign({}, request.headers(), {
    "Accept-Language": "en-US;q=0.7",
  });
  request.continue({ headers });
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!