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

223
Vistas
How can I make a request and NOT wait for response before redirecting?

I'm using Axios in a Vue app. I would like to send a request to my backend (to log the click of a button) but not wait for the response and then redirect the client to another page. Right now, the request is made, the redirect happens right away, and the initial request is 'cancelled' and my backend doesn't process the request.

I'd like to just fire off that request, then redirect AND NOT cancel the initial request. How can I do that?

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

0

Thanks all for the comments. Seems sendBeacon seems like it's been nerfed as you cannot send application/json for content type, and it this article says it is not reliable. So I used the following solution in my Vue component:

onClickLink: async function () {
  var img = new Image()
  img.src = `/my/path/to/controller/${this.$route.params.id}`

  window.location.href = externalLinksFile.new_url
}
about 4 years ago · Juan Pablo Isaza 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