A vanilla JS replacement for jQuery's ajax functionality, that worked on older browsers, would be welcome.
Edit: To clarify, a drop in replacement is what I was looking for.
Edit: To clarify, a drop in replacement is what I was looking for.
https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
fetch("http://www.example.com").then(res => res.json()).then(json => {})
Only big downside is no IE11 support but thankfully I don't have to worry about that so much these days. fetch(url, {
method: “POST”,
body: “a body”
})https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequ...
I don't know how far back it will help with old browsers. I'd need to test that and it will take awhile.
JSON.parse will throw a few older browsers by itself.