- Let's build a searcher!
- Giphy API
- News API
- Yelp API
3 Pillars: When some action happens, make a fetch request, manipulate the DOM
- limit
- pagnation
- search terms
- api-keys
- When a user submit a form, we want to make an fetch request to the proper API, and display the results on the DOM.
.forEach()
.map()
.filter()
- When we fetch, we can fetch with two arguments:
- url
string
- an options
object
- url
fetch(url, optionsObject)
- Options objects includes key-value pairs like
method
the HTTP verb for this requestheaders
additional information about this request
- Another form of Authorization and Authentication
- A synchronous-like syntax to write your async code!
- An
async
function always returns a promise