title: How to prevent Axios from adding slash after baseURL
body: <p>in my Vue app I took axios configuration to the seperate file <em>config.js</em>. </p>
  
  <p>Content of <em>config.js</em> </p>
  
  <pre><code>import axios from "axios";
  const token = localStorage.getItem('user-token');
  const baseUrl = `/api/v2.1/document.json&amp;token=${token}&amp;`;
  
  export default () =&gt; {
      return axios.create({
          baseURL: baseUrl
      })
  }
  </code></pre>
  
  <p>In my Vuex store module <em>formFields.js</em> I have:</p>
  
  <pre><code>import Api from '../../api/config';
  
  ...
  
  const actions = {
      async getApiFields() {
          await Api().get('type=documentType').then(function(response){
              console.log(response);
          }).catch(e =&gt; {
              this.errors.push(e)
          });
      }
  };
  </code></pre>
  
  <p>So, what is wrong? I don't know why axios add ' <strong>/</strong> '</p>
  
  <blockquote>
    <p>Request URL: .../api/v2.1/document.json&amp;token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI3ZTE2OTk5My00YTJiLTRhYWMtOGNiNi00ZTY0NGY2NjE3NTkiLCJhdWQiOiJNYWVzdHJvTElWRSIsInN1YiI6Ik1hZXN0cm9MSVZFIEFQSSIsImV4cCI6MTU4MDIwMTQ5OSwiaWF0IjoxNTgwMTk3NzE5fQ.PWstAQCDr6Atd_J26futucIBOBUZiFCcp0g5Y1JTYUs&amp;/type=documentType</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/UhiTz.png" rel="nofollow noreferrer">Network tab screenshot here</a></p>
  
  <p>How to prevent adding this slash?</p>