title: JavaScript Axios GET data= null
body: <p>I'm probably doing something wrong, but I can not find the reason.</p>
  
  <p>I try to perform a GET using axios, which if I do it from postman the answer is correct, but from axios it returns the data to null.</p>
  
  <p>Postman:</p>
  
  <pre><code>{
      "direccion": "Castelldefels, Spain",
      "lat": "41.279999",
      "lng": "1.970000"
  }
  </code></pre>
  
  <p>Code JS:</p>
  
  <pre><code>var boton = document.getElementById('location');
  boton.addEventListener('click', function() {
      loading.style.display = 'block';
      axios.get('https://restserver-test-jsg.herokuapp.com/location?location=Castelldefels', {
              responseType: 'json',
          })
          .then(function(res) {
              if (res.status == 200) {
  
                  console.log(res);
  
                  mensaje.innerHTML = res.data;
              }
              console.log(res);
          })
          .catch(function(err) {
              console.log(err);
          })
          .then(function() {
              loading.style.display = 'none';
          });
  });
  </code></pre>
  
  <p>The answer I see from the Chrome console is:
  <a href="https://i.stack.imgur.com/qmW1E.png" rel="nofollow noreferrer">chrome</a></p>
  
  <p>If I perform this operation from the browser, it returns what was expected.
  <a href="https://restserver-test-jsg.herokuapp.com/location?location=Castelldefels" rel="nofollow noreferrer">https://restserver-test-jsg.herokuapp.com/location?location=Castelldefels</a></p>
  
  <p>Thank you!</p>