title: Axios mock adapter giving error 'Error: Request failed with status code 404'
body: <p>I have a component in which I am making an API call on mount</p>
  <pre><code>import * as React from 'react';
  import axios from 'axios';
  import './index.scss';
  // import {axiosInstance} from '../../mocks/index';
  
  // axios(client)
  // axiosInstance(axios);
  const FeatureTable = () =&gt; {
     React.useEffect(() =&gt; {
      axios.get(&quot;http://localhost:8080/users&quot;).then(function (response: any) {
        console.log(response.data);
      });
    }, []);
  
    return (
      &lt;div className=&quot;container&quot;&gt;
    &lt;/div&gt;
    )
  }
  
  export default FeatureTable;
  </code></pre>
  <p>And I have setup my mock adapter in a different folder like this</p>
  <pre><code>const Axios = require(&quot;axios&quot;);
  const MockAdapter = require(&quot;axios-mock-adapter&quot;);
  import featureTable from './table';
  
  export const axiosInstance = Axios.create();
  const mock = new MockAdapter(axiosInstance, { delayResponse: 1000,  onNoMatch: &quot;throwException&quot;  });
  
  featureTable(mock);
  </code></pre>
  <p>In my table file, I have this code -</p>
  <pre><code>const users = [{ id: 1, name: &quot;John Smith&quot; }];
  
  
  const featureTable = (mock: any) =&gt; {
    mock.onGet(&quot;http://localhost:8080/users&quot;).reply(200, users);
  }
  
  export default featureTable;
  
  </code></pre>
  <p>Upon running the code, I get 404 error not found. Please help with the fix.<a href="https://i.stack.imgur.com/uPoFv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uPoFv.png" alt="enter image description here" /></a></p>