Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
test xhr vs API fetch hellia
(version: 1)
Comparing performance of:
xhr vs api fetch
Created:
2 years ago
by:
Registered User
Jump to the latest result
Tests:
xhr
const xhr = new XMLHttpRequest(); xhr.open('POST', 'https://www.google.com/'); xhr.onload = () => console.log(xhr.responseText); xhr.send();
api fetch
async function ajoutTravaux() { const reponse = await fetch("https://www.google.com/",{method: 'POST'}); if (reponse.ok){ const text = await response.text(); console.log(text); } } ajoutTravaux();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
xhr
api fetch
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?