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

154
Views
Solicitud HTTP POST de JavaScript: no se pudo cargar el recurso

En mi Proyecto estoy trabajando con diferentes servidores (en realidad vehículos) con diferentes direcciones IP. Cada vehículo tiene una lista de todos los vehículos y sus direcciones IP. Estoy tratando de inicializar los vehículos en un mapa en un bucle for. En este bucle for estoy enviando una solicitud de publicación a "http:ipOfVehicle:port:/get_position"

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

Todo funciona bien, pero si el primer vehículo está fuera de línea, no inicializará ni un solo vehículo. Y después de un tiempo aparece el error Error al cargar el recurso (en Safari) o el error net::ERR_CONNECTION_TIMED_OUT (en Chrome)

Probé diferentes métodos como try-catch, abortando con AbortController() y también verificando primero si se puede acceder al servidor con npm is-reachable, pero nada funciona.

Estaría muy contento si alguien pudiera ayudarme :)

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