title: Axios: config.method.toLowerCase is not a function
body: <p>I'm making a GET request with Axios in a React-Redux project, and I get the following error:</p>
  
  <pre><code>TypeError: "config.method.toLowerCase is not a function"
  
  request     Axios.js:43 
  wrap        bind.js:11 
  apiCall     api.js:32 
  apiCall     api.js:29 
  ...         ...
  </code></pre>
  
  <p>api.js is a file from my own project. bind.js and Axios.js is from the Axios library. This is my api function:</p>
  
  <pre><code>export function apiCall(method, path, data){
    let url = backendDomain + path
    let config = {
      method: [method],
      url: [url],
      data : [data],
      headers:{
        "Content-Type":"application/json",
        "Accept":"application/json"
      }
    }
     return new Promise((resolve, reject)=&gt;{
       return axios(config).then(res=&gt; {
        return resolve(res.data)
      }).catch(err =&gt; {
        return reject(err.response);
      })
    })
  </code></pre>
  
  <p>The function that makes use of apiCall() is this function:</p>
  
  <pre><code>export function authUser(url, userData, method){  
    return (dispatch) =&gt; {
      return new Promise((resolve, reject)=&gt;{
        return apiCall(method, "/"+`${url}`, userData)
        .then((data) =&gt; {
          ...
          resolve();
        })
        .catch(err=&gt;{
          ...
          reject();
        })
      })
    }
  }
  </code></pre>
  
  <p>Do you think there's something wrong with my code or is there something wrong with the library? When I use authUser to dispatch my action (for Redux State), I double checked that "method" is a String, I console.logged typeof method in api.js, and it returned string.</p>
  
  <p>Edit:</p>
  
  <p>I tried calling toString() to the method parameter passed into apiCall(), but it didn't work:</p>
  
  <pre><code>  let reMethod = method.toString();
    const config = {
      method: [reMethod],
      url: [url],
      data : [data],
      headers:{
        "Content-Type":"application/json",
        "Accept":"application/json"
      }
    }
  </code></pre>