Let's go through some exercises to get some practice with PUT and PATCH Requests for Web APIs together, using Deno.
We start with a warmup to look at the PUT and PATCH Request method types and log out the Request body.
In the first exercise we look at a PUT request and how we can replace an existing resource on our server using its ID.
Then, we look at the same exercise but with the addition of data validation both for a required field as well as checking for a letter in a String.
In the third exercise we look at PATCH requests and how the differ but also how they are mostly the same as PUT requests.
We wrap up with a BONUS to do all of the above exercises but with Multipart Forms as a body type instead of JSON.
Chapters:
00:00 Introduction
00:46 Warmup Exercise - Request Methods
06:24 Exercise 1 - PUT Request
24:31 Exercise 2 - Data Validation
38:55 Exercise 3 - PATCH Request
52:44 BONUS Exercise - MultiPart Forms
54:30 Next Steps
📦 Github Repository with the notes and exercise code+solutions: https://github.com/Nooder/rest-api-in...
💬 Come join us on Discord to chat with a like-minded community about tech and learning: / discord
🏅Support the channel and content through Super Thanks, Channel Memberships, or on Patreon: / techwithnader