Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

194
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!