Fetch
Definition
The modern browser API for making HTTP requests. `fetch()` returns a Promise that resolves to the Response object. It replaces the older XMLHttpRequest (XHR) and works with async/await.
Code Example
Learn More
Related Terms
An object representing the eventual completion or failure of an asynchronous operation. A Promise is in one of three states: pending, fulfilled, or rejected. Promises can be chained with .then() and .catch().
Async/AwaitSyntactic sugar built on top of Promises that makes asynchronous code look and behave like synchronous code. async functions always return a Promise, and await pauses execution until a Promise resolves.
APIApplication Programming Interface — a set of rules and endpoints that allow different software systems to communicate. Web APIs typically use HTTP methods (GET, POST, PUT, DELETE) to exchange data in JSON format.