Fetch

The browser's fetch function sends HTTP requests from JavaScript and returns a promise of the response. Chain .then to read the JSON, check response.ok before trusting it, and pass an options object to POST, PUT or DELETE.

Updated

Cheat sheet: Fetch
Category
JavaScript
Level
Apprentice
Tags
.catch(), .then(), Fetch API, JavaScript, JSON.stringify(), Promise, Response Object, rest-api