title: VueJS axios.get returns Error: Request failed with status code 404
body: <p>I've been debugging this code for a while, without much luck:</p>
  <pre class="lang-js prettyprint-override"><code>async getEvents() {
    try {
      let response = await axios.get(&quot;http://localhost:8000/events/&quot;);
      console.log(response);
      return response.data;
    } catch (error) {
      console.error(error);
    }
  }
  </code></pre>
  <p>The complete code sample is from: <a href="https://auth0.com/blog/how-to-make-secure-http-requests-with-vue-and-express/" rel="nofollow noreferrer">https://auth0.com/blog/how-to-make-secure-http-requests-with-vue-and-express/</a></p>
  <p>I receive an error when visiting the site that calls the API endpoint:</p>
  <pre><code>Error: Request failed with status code 404
      at createAxiosError (utils.js?c786:148)
      at Object.settle (utils.js?c786:127)
      at handleRequest (handle_request.js?da0c:126)
      at eval (index.js?94db:26)
      at new Promise (&lt;anonymous&gt;)
      at MockAdapter.eval (index.js?94db:25)
      at dispatchRequest (dispatchRequest.js?5270:52)
  </code></pre>
  <p>If I just copy the url (http://localhost:8000/events/) in the browser I receive the correct data. I have tried with and without trailing slashes.
  Am I misunderstanding the error message, and should I look elsewhere?</p>