Schedule > 7. Introduction to HTTP & the JavaScript Fetch API
Week 6: Wed, Feb 15
Readings
Intro to HTTP
- An introduction to HTTP: everything you need to know. Free Code Camp
- Sign up for Postman.
Intro to Fetch & Promises
- Lazaris, Louis (2020). Fetch API Tutorial for Beginners: How to Use Fetch API.
- fetch GET examples.
Note: this example (and subsequent ones) demonstrate both “then” “async/await” techniques. - fetch POST examples.
- fetch PUT examples.
Note: PATCH works the same way as PUT. Recall that PATCH only updates specific attributes of a resource while PUT replaces the entire resource with a new version. - fetch DELETE examples.
Slides
- Lecture 11: Intro to HTTP & Fetch
- Lecture 12: Authentication Headers, GitHub Pages, Intro to HW4
- Lecture 13: HW4 tips, modal windows
Videos & Lecture Files
Videos and worked examples will be published after class:
Activities
- Lecture 11 files: Fetch Examples (Wednesday, 02/15)
- Lecture 12 files: Modal Windows (Wednesday, 02/22)