Exercises: POST Requests - Rest APIs In Depth

Опубликовано: 05 Февраль 2024
на канале: Tech with Nader
537
23

Let's go through some exercises to get some practice with POST Requests for Web APIs together, using Deno.

We start with a warmup to look at Request method types and send back an appropriate Response.

In the first exercise we look at the main POST flow of creating a new resource using a JSON body and then adding it to our file on the backend in Deno.

Then, in exercise 2 we take what we learned in exercise 1 and add data validation to see how we can check for things like required fields and types in the Request body.

In the third exercise, we look at Multipart Forms and how they differ from the JSON body type we've seen so far. We use it to create a resource on the server, similar to exercise 1.

To wrap up the video we go through a Bonus exercise where we expand what we learned about Multipart Forms to add a binary body to our request and do things like upload images and other binary data to our server to save.

Chapters:
00:00 Introduction
00:40 Warmup Exercise - Request Methods
07:31 Exercise 1 - Create a new Resource
23:34 Exercise 2 - Data Validation
41:35 Exercise 3 - Multipart Form Requests
1:04:12 BONUS Exercise - File Uploads
1:26:22 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  


Смотрите видео Exercises: POST Requests - Rest APIs In Depth онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Tech with Nader 05 Февраль 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 53 раз и оно понравилось 2 людям.