JS Reference: Fetch API
Quick reference for Fetch API.
JS Reference — Fetch API
Quick summary of Fetch API with syntax and example.
Syntax
fetch(url).then(...).catch(...)
Example
async function load(){
const res = await fetch("https://api.github.com/zen");
const text = await res.text();
console.log(text);
}
load();