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

107
Vistas
axios get request endpoint issue

I signed up for a API key, however, I can not figure out how to get it to work into the JS file with axios.. this is that the website gives me.


Code Snippets
Example Responses
Results
const axios = require("axios");

const options = {
  method: 'GET',
  url: 'https://car-data.p.rapidapi.com/cars/types',   <---------
  headers: {
    'X-RapidAPI-Key': '*******************************',
    'X-RapidAPI-Host': 'car-data.p.rapidapi.com'
  }
};
--------------------------------------------------------------

and this is what I put in... the JS file..

const car = document.querySelector('#search-input')
    const response = await axios.get(
  'https://cardata.p.rapidapi.com/cars/types${car.value}&api_key=${API_KEY}')

**API_KEY set to a variable and so is car.value

What am I doing wrong?

about 4 years ago · Juan Pablo Isaza
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