Test name | Executions per second |
---|---|
node-fetch | 64523.9 Ops/sec |
axios | 13791.2 Ops/sec |
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/node-fetch@3.1.0/src/index.min.js"></script>
fetch('https://www.googleapis.com/discovery/v1/apis')
.then(response => response.json())
.then(console.log)
axios.get('https://www.googleapis.com/discovery/v1/apis')
.then((response) => response.json())
.then(console.log);