title: Unable to retrieve data from axios GET request
body: <p>I've been trying to send a GET request to an api to fetch data using Axios but always get a response object with status, headers, config, agents etc and response.data is always empty.</p>
  <p>For example, the following code returns me an Axios response object with the hasBody set to true and data being empty.</p>
  <pre><code>axios.get(`https://fantasy.premierleague.com/api/leagues-classic/12000/standings/`).then(response =&gt; {console.log(response); 
  console.log(response.data);});
  </code></pre>
  <p>However, when I switched over to using Request library which has been deprecated, I am able to get the response body. For example, the following code works:</p>
  <pre><code>request(`https://fantasy.premierleague.com/api/leagues-classic/12000/standings/`, { json: true }, (err, res, body) =&gt; {
          if (err) { return console.log(err); }
          console.log(body);
          });
  </code></pre>
  <p>Can someone tell me what am I doing wrong and how can I get the response body using axios? I'm a beginner and have spent hours trying to figure out so I would really appreciate any form of help.</p>