Fetch API with Async/Await (GET, POST, PUT, DELETE)

preview_player
Показать описание
Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship). I'll help you master the latest tech here:

👉 Discord: all my courses have a private Discord where I actively participate

⏱️ Timestamps:
0:00 - Intro
0:11 - GET-request with traditional syntax (.then & .catch)
6:18 - GET-request with modern syntax (async / await & try / catch)
10:50 - Side-by-side comparison
11:01 - POST-request with async/await
13:22 - PUT-request with async/await
14:02 - DELETE-request with async/await
14:24 - Improvements

#fetch #fetchapi #asyncawait #javascript #js
Рекомендации по теме
Комментарии
Автор

This is the best content available on the internet rn. I have searched several youtube channels but finally found a reason to smile

princeoguru
Автор

Wow, this guy is a good teacher. Very clear explanation.

AlbrechtJ
Автор

Thank you so much for your explanation! I was searching for a particular video that could cover a lof of ground on api and I found it. Your explanation is clear and precise and doesn't make any problems to understand comparing to the content in my native language

Coding-lsys
Автор

Tutorials by You and Net Ninja are just at another level🙌

ulugbektoshmatov
Автор

Hey dude, I just want you to know that your video helps me to understand better how to manipulate data from API. Thank You!

archangel
Автор

Thank you for this amazing content! Helped me a lot and it was the best I found on internet!

erickgarciacosta
Автор

very well explained and presented! Thanks very much!

leythecg
Автор

Excellent explanation... that is teaching ❤

prasad_yt
Автор

How to switch to another page properly? It shows that "total_pages: 2" within the data object.

basmong
Автор

Thanks for the video! Very useful!
I have a few questions:
@ 3:29 line 6
1) is this return statement mandatory/necessary?
2) How can we use this return statement? I'm trying to store the json data retrieved by fetch like this:
let words = fetch('words.json').then(res => {return res.json()})... or return the data in the next then() block but instead of the the array i'm expecting to get i'm getting a promise object. Of course i can declare a global array var and assign the res.json() to it... but i thought all these new features could somehow eliminate the use of global vars.

Any ideas please?

bitcollector
Автор

where can i get the source code you used in this video my good sir?

Khiladi-Kisse