title: How should I send JWT token in axios GET request?
body: <p>I'm new to Vue.js and want to make a request in a component to a restricted api:</p>
  
  <pre><code>  computed: {
      token () {
        return this.$store.getters.getToken; 
      },
     ...
  
  created () {
           axios
          .get( this.BASE_URL + '/profile/me')
          .then( res =&gt; {
                      this.profile = res.data;
                      console.log('profile is:', res.data);
  
            })
            .catch(error =&gt; console.log(error))            
      },
  </code></pre>
  
  <p>The problem is that I don't know how to include the token into the request header. So not surprisingly I get <code>401</code> error in response. </p>
  
  <p>And when I try</p>
  
  <pre><code>axios.defaults.headers.common['Authorization'] = this.token;
  </code></pre>
  
  <p>before the get request I receive <code>OPTIONS /profile/me</code> instead of <code>GET /profile/me</code> in the server logs.</p>
  
  <p>How can I fix it?</p>