title: Getting double requests from axios
body: <p>I am using axios in my react app to make calls to a api server. My api server is receiving double network calls for each request (one from my react app user agent and one from axios).</p>
  
  <p>Nginx logs:</p>
  
  <p><code>52.01.179.169 - - [09/Jan/2017:02:17:13 +0000] "GET /my_endpoint HTTP/1.1" 200 756 "-" "axios/0.9.1" "-"</code><br>
  <code>72.201.237.55 - - [09/Jan/2017:02:17:13 +0000] "GET /my_endpoint HTTP/1.1" 200 756 "http://localhost:8080" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36" "-"</code></p>
  
  <p>Why is this happening? The second request is what I really care about, but my api server is unnecessarily doing double the work.</p>
  
  <p>My web console indicates that only one AJAX call is being made, so where is this rogue axios request coming from?</p>
  
  <p>Code:</p>
  
  <pre><code>export function myEndpoint() {
    var url = API_BASE_URL + '/my_endpoint'
  
    console.log(url);
    const request = axios.get(url);
  
    return {
      type: 'my_endpoint',
      payload: request
    };
  }
  </code></pre>
  
  <p>FWIW, the console only logs this url once.</p>