Fetch API - JavaScript Tutorial for beginners
Vložit
- čas přidán 25. 06. 2024
- JavaScript Fetch API, how to use in with Promises, how it is different from XHR, and why use it?! This is episode 14 of 20 things Javascript Developers Should Know But Probably Don't.
00:00:00 Intro
00:00:45 What is Fetch?
00:01:51 Request()
00:02:52 Response()
00:04:09 🔴 Demo: Simple GET
00:08:12 🔴 Demo: Simple GET with Parameters
00:10:58 Request Parameters
00:12:10 Headers
00:12:49 🔴 Demo: Headers
00:17:12 Error Handling
00:17:41 🔴 Demo: Error Handling
00:26:24 History of Fetch and XHR
00:25:40 POST Request
00:28:00 Why Fetch?
00:22:59 Outro
Links mentioned in the video:
List of Free APIs:
free-apis.github.io/
publicapis.dev/
rapidapi.com/collection/list-...
ColorCode Etsy Merchandise store:
www.etsy.com/shop/ColorCodeStore
Episode 11: Asynchronous JavaScript:
• Async JavaScript & Cal...
Episode 12: JavaScript Promises:
• JavaScript Promises -...
Episode 13: Async Await
• Async Await vs. Promis...
Using Fetch (MDN):
developer.mozilla.org/en-US/d...
Full playlist here: • 20 Things JavaScript D...
JavaScript Promises from the series "20 Things JS Developers Should Know but Probably Don't"
by ColorCode.io, Sina Jazayeri
** Announcement **
Full JavaScript Mastery course is coming! Details at the end of the video. Sign up for Early Access here:
www.colorcode.io/js-mastery
Fetch API 🕺🏻👨🏻💻🎉 from the series 20 Things JavaScript Developers Should Know but Probably Don’t’.
make video on event loop 🔁
are try and catch methods common used than .then and ,catch methods ?
Just started my coding journey about 3 months ago. I'm so glad I found your channel, just by watching this one video I can tell that you are a phenomenal teacher that not only explains things really well, but you just make it super fun to listen to. Thank you!!
Great to hear! Good luck in your journey.
Sooner or later you'll get even more audience, that's for sure. Your quality is kinda unique here about JS (not boring, completely understandable even for foreigners and showing a great depth of knowledge at the same time).
Thank you 🙏🏼
@@ColorCodeioWhy no videos anymore 😢
This is probably the best, simplest explanation I could find on CZcams. Great work :)
🙏
I love that you forgot to bleep out 29:29. Great series! I already know almost everything you are talking about, but wouldn't be able to articulare it that well or give such good reasoning. This helps me to teach others!
man, i can listen to you for the whole day, so calm..
Consistently some of the best explained videos on these more advanced JS topics, really appreciate the time and effort being put into these!
Much appreciated!
Your videos are literally giving me the willpower to continue with my current assignment. Thank you! Excellent work, honestly.
Don't give up. You got this 👊
was waiting ages for .this vid :), great work!
I'm currently learning js and this series is a game changer, thank you ColorCode
I'm so happy to see you continuing with the series :D
Whenever someone is stuck on one of these topics i send them right to your videos!
I appreciate that
Awesome just as usual! You got the most stylish and informative tutorials
🙏
i love how sarcastic he is and i've only watched his video for like 2seconds...wow!! keep it up man
Dude, I love your style of teaching and sense of humor
I enjoy watching your tutorials alot! Keep up the good work!
🙏
Waiting for it 🔥🔥🔥🔥
you are the best teacher i have ever seen thank you please go on and create a lot of programming videos درود بهت آقا سینا
it's always so entertaining to watch one of your classes! thank youu
Thank you!
This is the best tutorial series I've seen yet. The production quality is excellent, the information is delivered in a straight-forward, understandable manner and I don't even hate all the puns. Very, very nicely done. Thank you for all the work that obviously went into this.
Thank you for taking the time to tell me that :)
Thank you man. Excellent edition.
glad that you are back sensei
🙏🥷
Really great video! Love the style, music, pacing. Awesome work and thank you for the help!
Thank you!
i loved the way you break down things and your positive energy 😊. Thank you 🙏!
I'm a JS/TS junior developer from Brazil. Thank you so much for sharing your knowledge with us! Really, you did a great job, my man!
The best series on Javascript Intermediate and Advance concepts!
Glad you like it!
the best video on fetch api i have found on youtube
Awesome!
Please just keep uploading, you are giving your knowledge on a so special way, fun and easy, the way that nobody else does. I see you as an idol for myself👍❤
Thanks! Glad to hear
Raw knowledges are the backbone of a great developer. Thank you for great teaching
Your videos are soo freaking good!! Just love it!
As a Test Automation Engineer, about a year ago I switched my C# brain over to JavaScript because I was building my test framework with Cypress. I've been stumbling along the whole year with no formal training, just getting by in making my tests to work even though I knew that I really didn't understand why sometimes the way I wrote the code worked, and sometimes not. Most of the tests start off calling many level nested promise-then blocks because to get the website up takes a lot of steps. Your series has been absolutely what I've needed and given me lots of ideas on how to refactor my code! Thanks so much for your series! Keep it up.
Want to make sure I reply to your comment before it gets lost in the shuffle. First, I appreciate your kind words and the fact that the videos have helped you. But also this is something I personally deal with on a daily basis in my day job as an engineering manager. I’m a big advocate of Cypress and automated testing. We use it in my organization, it’s such an underrated tool for building resilient software. The unfortunate thing about it is what you mentioned: most JS developers don’t actually know how the language works without significant help of modern frameworks, or even sometimes with them. So, I feel your pain, I’m glad you’re making progress, and I wish you a ton of success. Don’t give up.
Finally my request for DOM API has been accepted. Really looking forward to the next episode for another great content.
Coming soon!
need more content like this from you, a course on react will be awesome
Wellcome back Boss, I was waiting ❤
🤘
You content quality is just perfect, unlike other boring coding tuts, thank you this was really helpful
Glad it helped!
I can’t believe this is free. You can charge thousands of dollars for this series truly high quality
Oh my god, i LOVE your intros and i am enjoying them, specially this one, keep it up!
Thank you :)
Fetch betta have my data!!! You have probably the most confortable learning enviornments. I appreciate the effort creating wonderful atmosphere and visual effects.
Please don't give up! Your videos are incredible!
Thank you :)
salam sina jan merci az khodet va qoli babate video hat sabke tozih dadanet va energy e ke dari kheili khafane hamishe movafagh bashi .
Actually love the fact that you went to search for some TOOL with your request, I definetly did great subscribing to this channel, thanks for all the knowledge sharing in this serie, it was of great help to me :)
this is pure gold
the best explanation for promises ,async await and fetch till date...ur channel is really underrated ...i would say its the gold standard of adv js tutorials...thanks for the 20 part series
Much appreciated!
you're the trendiest youTube developer, man. your style is sick and your tutorials easy to follow; they make the user feel at ease. thank you for all these awesome series you've put together. I feel much more competent as a developer because of your wisdom.
That's awesome, thank you!
love your vids. would love to see recursion, hoisting, pure/impure functions, shallow/deep copy and memoization
I've been binge watching your videos over the last few days. Your natural, conversational delivery is absolutely brilliant. There are so many people doing JavaScript (React) project based tutorials, but this has been really nice series on vanilla JavaScript features. It's really helped me understand promises and async-await more clearly. I'd love to see a playlist series on Node.js and web servers. I'm not sure where your technical focus is, but understanding the more basic, core functionality and features of JavaScript on the server would be of great help to me and possibly others. So, to clarify not exactly a project based tutorial video playlist of how to use Node.js, but something like this where you're focusing on specific features of Node.js. Again, I'm not sure if that aligns with your interests and expertise, but it would be nice. Thanks for the work and commitment to these video series!!
Thanks so much for your comment.
the intro cracks me everytime :D
bro im impressed how you deliver this tutorial! just subscribed
Fantastic lessons and professionally done! I stumbled over your lessons while searching on the topic of API calls. It's the best explanatoin of async vs sync, callbacks and promises related to JS I have seen so far. I took several JS courses, but haven't heard or read anyone explaining it as well as you do. And now I will start from lesson 1. Thank you for this amazing information!
Thank you for very much for the comment! Glad these have been helpful for you.
awesome like always, can't wait for the dom api!
Coming soon!
Best js series by far. Thank you!
🙏♥
I've been really liking all your videos lately! keep it up :D
Thanks, will do!
I wish you could upload whole js course from basic to pro. The way of your explanation is just amazing.
Thank you, this video about the 'fetch' method helped me understand more about how to retrieve and send data from APIs using 'fetch' 🙏🏿⭐
I've been going through this series the past few days. Each time I went back to your channel it would play the beginning of this video. It was funny every time. 😄
Welcome back! 😀
Really enjoy this episode. Thanks a lot.
Glad to hear it!
the best the best the best. this was so needed to me, tomorrow i gotta do lecture about Fetch, this video is the best. i know i used the word best a lot, cos this person deserves that
Thank you, good luck with your lecture!
never seen a video like this before i learnt coding from a lot of resources even paid ones, and none of them matches the quality and ease of explanation and only giving what is important and to the point
Great work, awesome explanations
The frustration at 1:50 “which I’ll get to in a minute” 😂
🥸😀
New to your awesome channel! Been enjoying the Js series!
Btw, your teaching is top notch. Explanation and examples are crystal clear!
Excellent for learning fundamentals. Keep up the great work!
Awesome, thank you!
Excellent video! Thank you.
Thanks
Your work is so clean. Thank you
Ty!
i love your explining style
You're an awesome and amazing teacher! The topics that you teach are the hardest to understand and yet you managed to explain it so well! Thank you for creating this chamnel! I shall send this series to some of my programmer friends ❤
Omg, while I'm watching the tutorial, I can't help but to be happy because Im starting to understand API which I wasn't able to understand in some other courses and tutorial that I watched months ago. You are truly an angel good sir.
Awesome! Glad to hear
Much love for the effort you put in bro, great tutorials! Keep it up! Subbed of course :)
Glad it was helpful and thanks for the sub.
I started watching your episode 3 months ago and I really learn a lot from your videos super quality content I've found with amazing explanation. I was waiting for upcoming videos and the day is come. Thanks 🙏 love from Pakistan
That's great. Thank you for sharing.
Fantastic video as usual!
Thank you
Amazing video!!
Love your content. Love your humor love your explanation. I just checked if there is any posts :) Keep going :)))
Sina! I really have enjoyed your videos, very helpful and engaging. I love the way you present the information and your personality!
Thanks lucky dude!
I really, I mean really love how you explain concepts, just a minute into this video and I subscribed ✌️
Fantastic. Thanks for the sub.
The starting of the video is 🔥
🕺🏻🔥
thank you so much i watched all the 14 series and what an awesome explanations !!
Glad it was helpful! More coming soon.
Hello thank you for the explanation, it was smooth and I didn't even need to go back
Great!
Cheers from Brazil (First text in the news API response was in portuguese, but refering to an accident that happened in Italy)
Your content is saving me in my journey to become a full stack developer
Glad to hear it!
Oh no I reached the end. I'm an experienced developer but I've learned so much about the underlying logic of JavaScript by watching this course. I hope the new one comes out soon.
Glad you like the videos. They're not purely made for beginners. More coming soon.
Need you back Sina! How about a short on using Fetch with CURL? Jest testing/mocking videos? Time/Space complexity? Git/github? React? Love your content - has helped me tremedously.
Thanks for such Qolity content, I finally started to understand the topic of asynchrony🥳
Great video. Thank you so much for this.
You are so welcome!
That was a really good and also fun tutorial - keep it up
👍
Thank you so much for this!
♥️
very informative and helpful
This is the best tutprial on this topic by a huge margin.
Going to look back through your other videos and I hope you do more
Thanks
Thanks, will do!
Amazing video !!!! thanks chief
🙏
wow. This is so helpful and in same time so amusing that I can't even decide for myself whether it was an entertaining or educational video. Many thanks for great time ❤
I'm so glad!
Very well explained, thanks!
🙏
I rarely comment to be honest but hands down you are really the best teacher I have found to explain all of this. Sad we dont get as much videos as I would hope but I also get that such quality content takes time. I had so much fun learning with you I hope we see the masterclass soon. 😊
Thanks for saying that. A lot more videos coming soon. I promise :)
amazing explanation bhai waiting for more ...
Great quality. i need these videos to send to junior developers. Many thanks.
Thank you
awesome! keep up the great work
It's Just Amazing!
Amazing content man. Thanks 👌
♥️
Your videos are amazing, I watched a lot of videos trying to understand and this was the only one that helped me understand, Thank you for creating theses contents.
Great to hear!
It was a great series of videos I'll be waiting for DOM fundamentals. However, I like to see you covering particularly JavaScript classes (syntactic sugar) as well with its topics such as access modifiers, get-set methods and inheritance capabilities.
Good ideas
Quality is impressive!
Ty!
with respect, i feel like what the hell! how can anyone explain that so easy. its like a drug man
🙂 Glad you enjoyed it
Best video on fetch i have ever seen. You nailed it bro 🤜🤜🤜
Thanks!
A well done perfect tutorial which is not boring to watch this is very rare that I spent 30 mins watching a video about programming without even realizing it. Hope you make a tutorial about Vue or React Framework. Thank you!
Amazing, ty!
Best tutorials on CZcams 😍
Glad you like them!
You are a great teacher! Very clear examples, well paced and best of all, delivered with fantastic humour. I’m subscribed for life and looking forward to learning more from you. (Though hopefully it doesn’t take me all life to learn this language 😂).
Thank you