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

195
Views
axios get request, headers information in the wrong request

Frontend axios

Axios makes two (*1 & *2 ) requests with this provided code. The problem is that the necessary headers are only used once.

const token = getAuthToken()
axios
  .get("myResourceUrl", {
    headers: {
      authorization: token ? `Bearer ${token}` : '',
    },
  })

I need the provided headers in the second request. Why axios makes two requests and how to pass the headers to the second one?

*1 axios request #1

*2 axios request #2

I provided the full header resources in the screenshots. In the first, there are only a few headers while in the second one there are some more fields.

about 4 years ago · Juan Pablo Isaza
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!