Hacker Times
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ynniv
on April 19, 2022
|
parent
|
context
|
favorite
| on:
Ajax Battle: XMLHttpRequest vs. the Fetch API
This. Until fetch has all the features of xhr, what's the point of being pretty?
mmis1000
on April 19, 2022
|
next
[–]
I think fetch will never has all the features of `xhr`. At lease the sync `xhr` is not possible. The `promise` api don't even allow callback in `then()` to be called synchronized, let alone things like `fetch` that relies on it.
tgv
on April 19, 2022
|
prev
[–]
There are also fetch-like wrappers for xhr. Axios is a decent one, I think.
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: