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

153
Vistas
JavaScript HTTP POST Request: Failed to load resource

In my Project i am working with different servers (actually vehicles) with different ip adresses. Each vehicle has a list of all vehicles and their ip adresses. I am trying to initialize the vehicles on a map in a for loop. In this for loop i am sending a Post Request to "http:ipOfVehicle:port:/get_position"

const response = await fetch(url, {
    method: "POST",
    mode: "cors",
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify(data)
  })

Everything is working fine, but if the first vehicle is offline it wont initialize even one vehicle. And after a while i get the Failed to load resource error (in Safari) or the net::ERR_CONNECTION_TIMED_OUT error (in Chrome)

I tried different Methods like try-catch, aborting with the AbortController() and also first checking if the server is reachable with npm is-reachable, but nothing is working.

I would be really glad if someone could help me out :)

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