fetch
- fetch lets you make requests to a server
- Lets you specify URL, method, request body, headers, etc.
- Gives back the response in terms of a "Promise"
- It is a low-level function so you have to manually parse the request
fetch("https://some-url.com")
.then(response => { return response.json() })
.then(response => { console.log(response) })
18 / 25