Using Async/Await with the Fetch API - JavaScript Tutorial

preview_player
Показать описание
In this video I'll be showing you how you can combine the power of Async/Await with the Fetch API to fire off HTTP requests. This is a great alternative to using the traditional promise-based approach and can make your code a lot cleaner.

Support me on Patreon:

For your reference, check this out:

Follow me on Twitter @dcodeyt!

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!

#dcode #javascript #webdev
Рекомендации по теме
Комментарии
Автор

Very clear tutorial on the use of Async/Await with FetchApi. Thanks, Dom

{2021-12-28}, {2022-10-20}, {2023-08-24}

Pareshbpatel
Автор

This video really cleared up problems I've been struggling with for a long time. I love how it cleans up my code. I am so tired of errors caused by long, complicated, multiple 'then' statements.

OverwhelmingGrace
Автор

Wow. I was stuck on something for hours and this video just cleared up everything for me. Very simple and straightforward with easy to understand examples, great video!

marwanbassam
Автор

Stuck for 2 days and your video just solved it in 7 minutes. thank you so much.

HenrryWithRs
Автор

That's the best video on the subject I've seen so far!

julianaamerico
Автор

This was incredibly helpful! Thank you so much. I didn't realize that .json() requires an await as well, and I was pulling my hair out trying to figure out why I was getting a promise object instead of the data after using response.json(). Thanks again!

MagnusGoGo
Автор

that's what I wanted, no bullshit just straight up quality content.

andrzejserafin
Автор

holy smokes, wish I gotten to this video years ago! so clear and concise! very nice!

XerosXIII
Автор

That one-line async / await function blew my mind away.

hyfydistro
Автор

Also saved me quite a bit of time. Thank you !

armanrivard
Автор

This video helped me fix this problem i was stuck on, thank you

Hugos
Автор

thankyuso muachh this content truly help me figure out my project prblem

fahrul
Автор

Got some interviews coming, wish me luck!

AleksandarIvanov
Автор

Thank you! Great explanation. Makes code so clean and efficient.

magneticartist
Автор

As always, clean code, really easy to understand!
Content idea: What about headless browser tutorial (with something like puppeteer)?
Keep up with the great work!

flexDevelop
Автор

at 2:28 it's not really fair to say the await is 1 line while the fetch dot then is 3 lines because the await also requires the async function

montazmeahii
Автор

Clean explanation and makes it easy to do. Thanks

lejonjaro
Автор

Awesome explanation, thank you so much!

bmac-czrk
Автор

I'm not sure why the document.addEventListener stuff is needed. Can anyone explain please?

BenHuxford
Автор

Thanks for the video. I'm quite familiar with GET method, and wonder if we need to use async/await for other methods too?

piotrszczesniak