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

200
Vistas
Is there away to redirect an API response made by one page request to another in nextjs

I'm posting data to an internal API which queries a DB to find a match and retrieves the rest of the data in the columns.I want the result of the query to be redirected to another page for display.

 async function handleSubmit(e){
        e.preventDefault()
     
  const info = {referall,vclass,cover,coverPeriod} 

  const res = await axios.post("/api/setquote", info);
  if (res.status === 200){
   

    router.push('/pick-product')
  
  }else{
    alert('product does not exist')
  }

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

0

Its quite easy I just needed to use the useRouter hook and pass in the result as a query parameter then call in the getintialprops of the page I'm redirecting to.

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