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

394
Vistas
Access query parameters using axios

I am using React in the frontend and Django in the backend and I am currently doing the API integration for which I am using Axios.

So in the frontend side I am calling a URL like this

http://localhost:3000/attempt/?quiz_id=6

and I want the quiz_id = 6 so that I can use this afterward to access data in the backend.

I am using Functional components if that helps.

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

0

You can take a look at axios's documentation in github

If what you want to do is a GET request this should be enough:

axios.get('http://localhost:3000/attempt/?quiz_id=6')
  .then((res) => {
    // handle success
    console.log(res);
  })

Also you have available this kind of usage:

axios.get('http://localhost:3000/attempt', {
  params: {
    quiz_id: 6
  }
}).then((res) => {
   // handle success
   console.log(res);
  });
about 4 years ago · Juan Pablo Isaza Denunciar

0

You can use this too:

const data =  await axios.get('http://localhost:3000/attempt/?quiz_id=6').then(res => res.data);
about 4 years ago · Juan Pablo Isaza Denunciar

0

You can include dynamic quiz_id by using params. The way for this is to making an axios request using the id of the param that you want to update and return:

Your code will read like so:

axios.get('http://localhost:3000/attempt/${quiz_id}', quiz_id);
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