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

182
Vistas
Getting Error: Network Error at e.exports (createError.js:16) at XMLHttpRequest.g.onerror (xhr.js:117) for API call

I am trying to make an API request by Axios but am getting this error.

Error: Network Error
    at e.exports (createError.js:16)
    at XMLHttpRequest.g.onerror (xhr.js:117)

Here is the code:

    async function getData() {
  await axios
    .get(
      "api.openweathermap.org/data/2.5/weather?q={city name}&appid={api key}"
    )
    .then(function (data) {
      console.log(data);
    })
    .catch(function (err) {
      console.log(err);
    });
}

How can I solve this?

Thanks

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

0

Try mentioning the right protocol.

"https://api.openweathermap.org/..."

Make sure you're using the right URI path. Also check your connectivity. The values of err might be worth examining as well.

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