title: Getting Error: Network Error at e.exports (createError.js:16) at XMLHttpRequest.g.onerror (xhr.js:117) for API call
body: <p>I am trying to make an API request by Axios but am getting this error.</p>
  <pre><code>Error: Network Error
      at e.exports (createError.js:16)
      at XMLHttpRequest.g.onerror (xhr.js:117)
  </code></pre>
  <p>Here is the code:</p>
  <pre><code>    async function getData() {
    await axios
      .get(
        &quot;api.openweathermap.org/data/2.5/weather?q={city name}&amp;appid={api key}&quot;
      )
      .then(function (data) {
        console.log(data);
      })
      .catch(function (err) {
        console.log(err);
      });
  }
  </code></pre>
  <p>How can I solve this?</p>
  <p>Thanks</p>