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

171
Views
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 answers
Answer question

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 Report
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!