Ten Steps to Mastering the Fetch API

Поділитися
Вставка
  • Опубліковано 1 жов 2024

КОМЕНТАРІ • 136

  • @user-gi3oc1kv5m
    @user-gi3oc1kv5m Рік тому +54

    I appreciate your channel so much. I randomly came across it while giving myself a refresher on a few things, and your JavaScript playlists are excellent. Now we get this gem??? Super awesome!

  • @jesf570
    @jesf570 Рік тому +20

    I've seen a lot, and within 5 minutes I can tell, this guy is a natural real life teacher not just a UA-camr. Name checks out. Love it

  • @Gohealt
    @Gohealt Рік тому +17

    Hands-down, one of the best teachers out there, regardless of discipline.

  • @billwoods4935
    @billwoods4935 Рік тому +10

    You're one of the few who could actually TEACH programming concepts. Thanks for creating rich content for us, I appreciate it. This could have easily been a premium course. I, myself, am a content creator/instructor, and I know how hard and time consuming it really is to put together a course with this quality and chaining/relating each section to each other. Again thanks for sharing such a high quality tutorial with us, free of charge.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Рік тому +5

      Well, that is what I do for a living. I run the Mobile Application Design & Development program at Algonquin college in Ottawa, Canada.
      I originally started this channel as a resource for my own students but then it grew organically. Now I know of at least a dozen college programs that use my videos as part of their curriculum.

  • @TinyMaths
    @TinyMaths Рік тому +5

    Wow... This is basically what I need. Just built a few apps (including a weather app) using fetch API and wanted to get deeper into the subject because I used multiple fetch calls in the weather app and wanted to organize them better (among other things). This is perfect timeing for something I really needed. Thank you!

  • @swedishpsychopath8795
    @swedishpsychopath8795 Рік тому +4

    I thought ColorCode was good, but then this guy appeared in my playlist while I was sleeping! OH MY GOD! You are a wonderful teacher / presenter!!! The BEST!

  • @MoH4Nn4D
    @MoH4Nn4D Рік тому +4

    You are the best, the way you just handle the code, your calmness your warm voice all come with a very sweet rhythm and atmosphere of learning.

  • @paperC_CSGO
    @paperC_CSGO Рік тому +6

    Thumbnail game on point!

  • @pranaypaul5216
    @pranaypaul5216 8 місяців тому +1

    Great content this is what i'am looking for and i found it Thank you

  • @amitanand6810
    @amitanand6810 Рік тому +3

    I was waiting for this type of compiled videos!
    finally you are doing this!
    It might sound cheesy but you are the best on the youtube!

    • @amitanand6810
      @amitanand6810 Рік тому +2

      also finally we got to see you on your thumbnail!
      i would say you are the best js GURU, i don't know what the youtube algo is doing(don't know why so underrated!)

  • @devynity4507
    @devynity4507 10 місяців тому +2

    I will start this tomorrow, I'm searching for "THAT " one video that will lead me back on my path again because it seems that I'm currently not moving forward as of late, I hope this video is it!

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  10 місяців тому +1

      Good luck! 👍

    • @devynity4507
      @devynity4507 10 місяців тому

      @@SteveGriffith-Prof3ssorSt3v3 Thank you for this video! Its so easy to follow, Thanks for making me move forward prof!

  • @bones1225
    @bones1225 Місяць тому

    About time somebody actually produced an informative/useful/enlightening/dummyfree/fun to watch vid. Many thanks. Change your channel name to Jesus helping the poor.👏

  • @TyronneRatcliff
    @TyronneRatcliff Місяць тому

    Solid content! If you can master the Javascript Fetch API you will have a really good understanding of how the frontend end of an application communicates with the backend.

  • @usmonovdev
    @usmonovdev Рік тому +1

    extremely amazing content, Thank you so much 🤩🔥

  • @daniel_williams
    @daniel_williams 3 місяці тому

    Can't thank you enough for your effort to make such amazing tutorial. It was fun to watch and clear enough to understand. Take love professor♥

  • @mikelantzelo
    @mikelantzelo 6 місяців тому

    Thank you very much!!!Excellent explanation

  • @awakenwithoutcoffee
    @awakenwithoutcoffee 5 місяців тому

    Hey Steve, thank you for the amazing course! Very generous of you to share so much knowledge. I do have a question:
    - the server isn't working for me properly, do you have a video or resource that goes over setting one up ourselves like you did ?

  • @eric55099
    @eric55099 3 місяці тому

    You the BEST...much love from Nigeria

  • @Franklin7x
    @Franklin7x 8 місяців тому +1

    You are the best! Thank you very much, your content is perfect. You speak very clearly and calmly. I'm not a native English speaker, but it's very easy to understand what you're saying. I'm learning a lot from you, thank you very much Steve! best youtube channel.

    • @Franklin7x
      @Franklin7x 8 місяців тому

      I can rewatch this video 10x times and I not get tired of it 😁

  • @TyronneRatcliff
    @TyronneRatcliff 5 місяців тому

    Awesome tutorial. Thanks!

  • @ryanwoods3333
    @ryanwoods3333 10 місяців тому +1

    Thank you Steve!
    Unit testing with React would be really helpful and especially how to mock API calls since I don't fully understand it.

  • @user-gi3oc1kv5m
    @user-gi3oc1kv5m Рік тому +1

    I wanted to thank you twice xD
    Thank you for sharing your knowledge with the world.
    If you by chance were looking for some video ideas:
    - Development to Production process
    - How do you know if your basic static website is secured enough to go online?
    - More in depth on unit tests
    - Authentication for Registration and Logging in (with testing)
    Just some suggestions!
    I look forward to more of your videos :)

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Рік тому +2

      Thank you again!
      I have a video where people can post requests and vote on the requests - ua-cam.com/video/LCezax2uN3c/v-deo.html
      On my own list I have over 2000 videos that I want to make. :) Just a question of time.
      unit tests and web authentication are two topics that I hope to do soon though.

  • @Anonymouzee
    @Anonymouzee Рік тому

    You're a "manancial" of information...
    complete, relevant and exaustive information...
    but man... 2h20m!!! (with pausing for testing, etc. etc.) that is exausting !!! ;-)

  • @fahadmohamed5734
    @fahadmohamed5734 2 місяці тому

    1:53:14 guess who was getting around with cors 😂😂😂😂💔

  • @JulietCharlotte-y5c
    @JulietCharlotte-y5c 12 днів тому

    White Kevin White Barbara Garcia Helen

  • @DeathBender
    @DeathBender 8 місяців тому

    Shouldn't we just use Observables (RxJs) or Project Reactor nowadays? Is the Fetch API (promises) still the "way to go"?

  • @hesamrahmani
    @hesamrahmani 7 місяців тому

    your amazing this video was so useful for me

  • @diegoavendanohernandez9908
    @diegoavendanohernandez9908 11 місяців тому +1

    This is by far the best fetch tutorial. Thank you so much for taking the time. A slow peace explanation really makes the difference for some of us to understand better

  • @johnmahugu3527
    @johnmahugu3527 2 місяці тому

    this is perfect prof, thank you so much for this.

  • @smilemakerb
    @smilemakerb 6 місяців тому

    Awesome tutorial! Always love your videos

  • @simonmalaret5506
    @simonmalaret5506 4 місяці тому

    On part 5 it feels like your code in vulnerable to XSS. I've heard quite a lot about that and I am in the point of my dev journey where I want to understand how to write code that isn't vulnerable in vanilla js. Would you mind explaining how the code in the video is vulnerable pls? How to not make it vulnerable?
    Thank you :D

  • @brucewayne252
    @brucewayne252 Рік тому +1

    Have got a good feeling just seeing this 2 hour plus lecture ❤. That too on fetch API

  • @amirhosseinghasemi4831
    @amirhosseinghasemi4831 8 місяців тому

    I really enjoyed it. Thank you

  • @mdsazzadhossainsiam6279
    @mdsazzadhossainsiam6279 4 місяці тому

    I love to learn something in detail. It's a really helpful tutorial.
    But sir, you created a response object (0:32:35 ) but didn't use it. Is there any case to use it?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  4 місяці тому

      When saving files in the cache via the Cache API, I create custom Response objects all the time.
      When working with PWA and service workers, you will need to send back custom Response objects too.

  • @FlamingoFliez
    @FlamingoFliez День тому

    your work is so clean!

  • @AmirAliJohari-e4y
    @AmirAliJohari-e4y 4 місяці тому

    hey there!
    thanks for your simple and deep speech , just one small question when i write export at the first before writing function i get an error what is that for?
    thanks if you help me.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  4 місяці тому

      What kind of error? What is the error message? Without seeing your code I don't know what you have done wrong.

  • @vinoverde74
    @vinoverde74 5 місяців тому

    Thank you so much for this excellent detailed tutorial. Appreciate your teaching style greatly. I am having a little trouble with fetch in section 4 (Response objects) timestamp 43:58. I am trying to fetch the fontstr and not sure how to apply it to the CSS. Here is my code. Will be grateful for any help.
    fetch(fontstr)
    .then((resp) => {
    if (!resp.ok) throw new Error('Invalid response')
    return resp.blob()
    })
    .then((blob) => {
    let fonturl = URL.createObjectURL(blob)
    let element = document.getElementsByTagName('h1')[ 0 ]
    let myFontFace = new FontFace('myFont', 'url(' + fonturl.blob + ')')
    console.log(myFontFace)
    element.style.fontFamily = myFontFace // console.warn(err.message))

  • @djlee0721
    @djlee0721 Рік тому +1

    Gold! Thank you professor 🙏🏼

  • @MRMOTOFOTO
    @MRMOTOFOTO 8 місяців тому

    The thumbnail title is not a lie

  • @GurpreetSingh-op3ie
    @GurpreetSingh-op3ie 9 місяців тому

    Great content! What about interceptor, can we intercept all fetch calls. If not we can always write a wrapper.

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  9 місяців тому

      There is no global handler for fetch calls. You can send an abort signal to kill a call. - ua-cam.com/video/3yTs1NJZyBk/v-deo.html
      You can wrap a collection of fetch calls in a Promise.all( ) or Promise.race( ) or Promise.allSettled( ) call. ua-cam.com/video/p0teXNcgR_Y/v-deo.html

  • @nevestunga955
    @nevestunga955 5 місяців тому

    👌👌👌👌👌👌👌

  • @fahadmohamed5734
    @fahadmohamed5734 2 місяці тому

    2:18:41 WoW this definitely as you said "the last fetch vid I'll need" well done well structured and I like your sense of humour ❤😂.
    I'm amazed by the power of JS & Browser on handling all that seamlessly.

  • @zoropppp
    @zoropppp 9 місяців тому

    You are a Genius ❤❤❤❤

  • @shahinza
    @shahinza 7 місяців тому

    Hello Professor, @35:37 in your video, you mentioned that there is a FOOTER as well, but I couldn't find any information about it online. Could you please assist me in finding resources to learn more about it? Thank you

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  7 місяців тому +1

      The standard has actually changed quite a bit since I first started working with HTTP requests. There is now a crc calculation in the footer of a gzipped file. So, if gzip is being used to compress the resource that is being transferred over http, then that is where you will find the crc.
      There can also be crc checksum values in the TCP/IP layer. These are backed up by other crcs that can be found in the Ethernet layer.
      All this to say, you don't need to worry about crc in your fetch calls.
      However, if you are interested in providing some more integrity for your files - script and link tags in your HTML - and you want to make sure that they are "verified" or not tampered with or modified, then you can add the integrity attribute to those tags. ua-cam.com/video/5a3LthQ2xCI/v-deo.html

    • @shahinza
      @shahinza 7 місяців тому

      @@SteveGriffith-Prof3ssorSt3v3 Thank you so much, Professor.

  • @kritikaverma8739
    @kritikaverma8739 Місяць тому

    Stumbled across your channel randomly and I'll have to say yours is the best explanation on yt and that's saying a lot because I have already watched 100s of them trying to make sense of javascript. Thanks a lot Steve. 😊

  • @prashanherath9944
    @prashanherath9944 9 місяців тому

    excellent content ♥. A teacher who knows stuff and most importantly who knows how to TEACH. Thank you !!!

  • @abdallahazme4757
    @abdallahazme4757 3 місяці тому

    Thank you so much sir! I really like your teaching style, no flashy edit, no colory stuff just good explantions of concepts, just to the point. I really wonder if you could have the time to make videos for basic web apis outside the flashy now days frameworks

  • @joshuaachorn8327
    @joshuaachorn8327 7 місяців тому

    What font are you using? I love the style of the () characters

  • @dimjim2365
    @dimjim2365 9 місяців тому

    Wow, my mind is totally blown. Ha. Thanks. Wish I had found this 2 months ago. You have answered soo many questions that I had. Love the presentation.

  • @matteonegridev
    @matteonegridev 5 місяців тому

    Wow this is amazing! Best teacher hands down!

    • @matteonegridev
      @matteonegridev 5 місяців тому

      P.s I came across your channel randomly, then realized I was following a Reddit thread and you were there!

  • @valenciawalker6498
    @valenciawalker6498 6 місяців тому

    Thank you!

  • @blendshala6506
    @blendshala6506 5 місяців тому

    this is amazing

  • @lightmanBroInnovation
    @lightmanBroInnovation Рік тому

    Proffessor is the best..
    i mean it. Any time i want to understand more about web development stuffs then i come to your channel.
    Thanks for all you do @Steve Griffith ☺☺.

  • @jacobwwarner
    @jacobwwarner 9 місяців тому

    I wasn't aware of creating a URL object before to run the fetch request. I've only passed in the URL as a string, so this is new and inciteful. Thanks

  • @aadil4236
    @aadil4236 Рік тому +1

    You are very handsome. I am not gay. I don't know why I clarified that but you are a handsome fella.

  • @devstefancho
    @devstefancho Рік тому

    oh my god, I’ve watched many tutorials on YT, but this is the new type of the video I’ve never seen before.
    Great work!

  • @gauravdaware8671
    @gauravdaware8671 6 місяців тому

    This tutorial provides a comprehensive overview of fetch() api, covering all the essential aspects in depth. Thanks to Steve.

  • @Glitch-txs
    @Glitch-txs 8 місяців тому

    amazing!

  • @whosbetter9108
    @whosbetter9108 Рік тому

    OMG! the way you explained these concepts maked them look so simple you a wonderfull teacher and an amazing human being , i can't thank you enough now matter what i write , thank you from the heart.

  • @gagandeepdayal
    @gagandeepdayal Рік тому

    Your tutorials are always amazing Steve. Your old subscriber here 😊

  • @ruudkorunka
    @ruudkorunka 8 місяців тому

    This is by far the most extensive tutorial about FETCH. This will be my standard issue from now on.

  • @xzex2609
    @xzex2609 2 місяці тому

    you can not imagine how valuable this video is, I killed myself to learn these stuff in the video and all I got was documentation to read. thanks

  • @nchomey
    @nchomey Рік тому +1

    I can't wait to dig into this!
    One question - does it cover ReadableStream and WritableStream? Or do you have other videos that do?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Рік тому +3

      In the bonus section it briefly touches on using Readable streams to monitor download progress.
      I have other videos for streams planned though.

    • @nchomey
      @nchomey Рік тому

      @@SteveGriffith-Prof3ssorSt3v3 great, thanks!

  • @nickrodriguez7758
    @nickrodriguez7758 Рік тому

    Absolutely flawless video, thank you very much!

  • @Fshhady
    @Fshhady Рік тому

    Thank you Steve. Thank you very much my friend for the great content.

  • @Aditya-gh4jy
    @Aditya-gh4jy Рік тому

    The best Explanation of the Fetch API on UA-cam.

  • @chmkzt
    @chmkzt 4 місяці тому

    Thank you so much Steve. You make this so easy to learn.

  • @prashlovessamosa
    @prashlovessamosa Рік тому

    Sir thank you I was struggling to understand this thing but you made it so easy.

  • @sjshdhehbesjks
    @sjshdhehbesjks 7 місяців тому

    best teacher on internet thanks a lot for providing this quality content for free

  • @eirenedelosreyes6025
    @eirenedelosreyes6025 Рік тому

    the video is very helpful and informative.

  • @chhavimanichoubey9437
    @chhavimanichoubey9437 Рік тому

    This is the ultimate video i was looking for in last 24 hours, thanks for the effort, added a star to your github repo.

  • @abdiag603
    @abdiag603 Рік тому

    Hi Steve. Thanks for this valuable tutorial. If I may ask, innerHTML method isn’t recommended coz of performance and security issues. Does it mean using it alongside .map() and .join() methods makes it less secure and enhance performance

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Рік тому

      The source of your data is the source of any insecurities. If you don't trust your data source then you need to validate the data before using it on your page.
      InnerHTML gave poor performance a long time ago. Using it once to parse and append a chunk of html will still be faster than calling append repeatedly.

  • @sayeddileri3461
    @sayeddileri3461 11 місяців тому

    Hi Steve, I really appreciate your dedication to your videos. I have gained so much value. Thank you.
    Is there any plans on realising videos for MVC / Design Patterns?

  • @navinkarki6354
    @navinkarki6354 Рік тому

    now you are getting views what you really deserve

  • @rockNbrain
    @rockNbrain Рік тому

    nice job dude! that was awesome! tks a lot!

  • @omojjegomosc8211
    @omojjegomosc8211 6 місяців тому

    Best API tutorial that I've seen.

  • @damaniturner6510
    @damaniturner6510 Рік тому

    This is incredible!!! Thank you so much professor!

  • @xzex2609
    @xzex2609 2 місяці тому

    your channel is a gold mine.

  • @yasminalsham5619
    @yasminalsham5619 Рік тому

    Many many thanks Steve for sharing

  • @filipivanovic9556
    @filipivanovic9556 8 місяців тому

    this tutorial is a pure gold

  • @246rs246
    @246rs246 Рік тому

    like always best content ever

  • @rommeld.guerrerov.8505
    @rommeld.guerrerov.8505 Рік тому

    Great content and explanations

  • @iuliancarnaru954
    @iuliancarnaru954 Рік тому

    Great content, amazing value

  • @and_metatheory
    @and_metatheory Рік тому

    great video, a lot of useful info

  • @fellastout
    @fellastout Рік тому

    Thank you, professor, as always.
    For the 2nd module (try-async.js). Is it not possible to throw a new Error object and save it in a variable? I'm getting an "Expression expected" and not sure why. I was thinking of creating a custom error object to reference in the try catch block.
    if(!response.ok) {
    let myVariable = throw new Error('not a valid response')
    }

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Рік тому

      You can put an error object into a variable like this:
      let err = new Error(`message`);
      However, as soon as you throw the error it goes immediately to the catch. No assignment takes place.

    • @fellastout
      @fellastout Рік тому

      ​@@SteveGriffith-Prof3ssorSt3v3 Interesting, I'll look more into it. See if it's possible with a second await keyword or perhaps using setTimeout. You dont have to respond with a yes or no; let me dig this rabbit hole. =)

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  Рік тому +1

      @@fellastout that's when the learning happens

  • @yitingchen8278
    @yitingchen8278 Рік тому

    always great content !!

  • @emmanueleban1096
    @emmanueleban1096 Рік тому

    This is great boss..thanks

  • @kevink3072
    @kevink3072 Рік тому

    Thank you in advance

  • @romeojoseph766
    @romeojoseph766 Рік тому

    Wait is this better than the fetch(or ajax) playlist you have

  • @bmehder
    @bmehder Рік тому

    What a great deep dive into fetch. It feels so nice to know I can always come back to this video for fetch documentation. Thank you!

    • @hasiibali2513
      @hasiibali2513 Рік тому +1

      i never got it so better. really. everytime i have an issue I search this channel

  • @danielchazan4011
    @danielchazan4011 Рік тому

    Bless you Prof3ssor.

  • @wick12298
    @wick12298 Рік тому

    Best teacher and a great explainer!

  • @kkomax7
    @kkomax7 Рік тому

    FANTASTIC!

  • @Brad_Script
    @Brad_Script 10 місяців тому +2

    innerHTML with string interpolation is nice but it's unsafe. You should never use it with data coming from the outside, you risk having XSS. It's much safer to build html element with document.createElement then use the innerText/textContent setters to safely write the content on the page.

  • @goffyfoot82
    @goffyfoot82 Рік тому

    Thank you ..!!

    • @goffyfoot82
      @goffyfoot82 Рік тому

      you have to good stuff to watch !! and a very nice way of communicating the material. Peace .....

  • @mimizcool123
    @mimizcool123 Рік тому +2

    what I love about your videos is that I know I’m always going to learn something new, even for topics I’m already familiar with. thank you for the depth, detail and care that you put into your content!

  • @anesdiaf
    @anesdiaf Рік тому +1

    Neat as always,
    i think a lot of devs need this, especially when -tech leading- teams like vercel are using the fetch api as their primary method to handle http transactions.

  • @dmwasielewski
    @dmwasielewski Рік тому

    Grate course, that's what I'm learning right now. Thank you very much!