Fetch: the new AJAX API

One of the worst kept secrets about AJAX on the web is that the underlying API for it, `XMLHttpRequest`, wasn't really made for what we've been using it for. We've done well to create elegant APIs around XHR but we know we can do better. Our effort to do better is the `fetch` API. Let's have a basic look at the new `window.fetch` method, available now in Firefox and Chrome Canary.
http://davidwalsh.name/fetch

Join 9,500+ smart developers

Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

No spam. Unsubscribe anytime. You can also follow me on X.

Found something interesting to share? Submit a link to the community section.