Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Chrome 115
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
node-fetch 18110.3 Ops/sec
axios 11364.5 Ops/sec
HTML Preparation code:
x
 
1
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
2
<script src="https://cdn.jsdelivr.net/npm/node-fetch@3.1.0/src/index.min.js"></script>
3
Tests:
  • node-fetch

     
    fetch('https://www.googleapis.com/discovery/v1/apis')
      .then(response => response.json())
      .then(console.log)
  • axios

     
    axios.get('https://www.googleapis.com/discovery/v1/apis')
      .then((response) => response.json())
      .then(console.log);