title: NODEJS - AXIOS : Error : The "url" argument must be of type string. Received type object at Url.parse
body: <p>I am trying to fetch data from a rest API using AXIOS as below:</p>
  
  <pre><code>require('dotenv').config();
  const axios = require('axios');
  
  var url = 'https://931eb067-05c0-492a-8129-48ebfc27d426-bluemix.cloudant.com/dummy/_design/NEW_VIEW_DESIGN/_view/new-view?include_docs=true';
  axios.get({url,auth: {
      username: process.env.account,
      password: process.env.password 
  }}).then((res)=&gt;{console.log(res.data);})
  .catch((e)=&gt;{console.log(e)});
  </code></pre>
  
  <p>I am able to access the metioned URL seperately by providing the credentials but I am getting the below error while using AXIOS</p>
  
  <blockquote>
    <p>The "url" argument must be of type string. Received type object at Url.parse</p>
  </blockquote>
  
  <p>What has gone wrong?</p>