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

155
Views
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
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!