Run details:
Mozilla/5.0 (Linux; Android 11; RMX1921) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Mobile Safari/537.36
Chrome Mobile 106
Android
Mobile
2 years ago
Test name Executions per second
axios 561.0 Ops/sec
fetch 873.6 Ops/sec
HTML Preparation code:
AخA
 
1
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
Tests:
  • axios

    x
     
    const url = "https://jsonplaceholder.typicode.com/todos";
    axios.get(url)
    .then((response) => console.log(response.data));
  • fetch

     
    const url = "https://jsonplaceholder.typicode.com/todos";
    fetch(url)
      .then((response) => response.json())
      .then((data) => console.log(data));