Fetch API
noun
say it: “FECH AY-PEE-EYE” /fɛtʃ ˌeɪ piː ˈaɪ/
The browser's built-in way to make HTTP requests from JavaScript, returning a promise of the response.
What is Fetch API in JavaScript?
Fetch API — A browser and runtime API for making HTTP requests that returns a Promise.
async function loadOrder() {
const response = await fetch("/api/order");
return response.json();
}
In a sentence
- “The Fetch API loads the products from /api/products without reloading the page.”
Level: Journeyman · More JavaScript terms at this level
Updated