Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

204
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda