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

310
Vistas
Why is my request working in postman but not axios?

I am trying to make a request in axios. The same request works in postman.

await axios({
      method: "post",
      url: `https://ecommersappbytim.herokuapp.com/info/${userId}/update-user`,
      header: {
        "Content-Type": "application/json",
        "auth-token": { token },
      },
      data: {
        firstName: userInfo.fName,
        lastName: userInfo.lName,
        email: userInfo.email,
        password: userInfo.password,
      },
    })

Is there something I am missing? I have made sure that I am passing in the correct data.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I have found the same error, apparently it is a CORS problem with the headers. What worked for me was passing the token through the url in the form of a query and receiving it in the backend through passport with its jwtFromRequest: ExtractJWT.fromUrlQueryParameter('auth-token'). I don't know if it is the most optimal way to pass the token to the backend but it is the one that worked for me.

I hope this has helped you.

almost 4 years ago · Nicolás Marsili Denunciar
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