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

198
Views
Response.header in console shows blank, but in the network tab there are headers

I am trying to programmatically access the headers of a response.

PS: Using Chrome. If I add a breakpoint and inspect the response object, it looks like it has no headers.

If I try print of the headers, both of these log statements show {}:

    const response = await fetch(request);
    console.log('headers stringify:', response.headers);
    console.log('headers:', JSON.stringify(response.headers));

However in the Chrome dev tools Network tab it shows the response had headers. How does one access the headers of a response object?

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

0

Thanks to @alittleSalty for the link which explains the headers are an iterable, and can be seen with:

response.headers.forEach((value, key) => console.log("header:", key, 'value:', value));
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!