title: axios get request, headers information in the wrong request
body: <h3>Frontend axios</h3>
  <p>Axios makes two (*<strong>1</strong> &amp; *<strong>2</strong> ) requests with this provided code. The problem is that the necessary headers are only used once.</p>
  <pre class="lang-js prettyprint-override"><code>const token = getAuthToken()
  axios
    .get(&quot;myResourceUrl&quot;, {
      headers: {
        authorization: token ? `Bearer ${token}` : '',
      },
    })
  </code></pre>
  <p>I need the provided headers in the second request. Why axios makes two requests and how to pass the headers to the second one?</p>
  <p>*<strong>1</strong>
  <a href="https://i.stack.imgur.com/o5QmP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o5QmP.png" alt="axios request #1" /></a></p>
  <p>*<strong>2</strong>
  <a href="https://i.stack.imgur.com/4jm1I.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4jm1I.png" alt="axios request #2" /></a></p>
  <blockquote>
  <p>I provided the full header resources in the screenshots. In the first, there are only a few headers while in the second one there are some more fields.</p>
  </blockquote>