Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

196
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda