Asynchronous JavaScript Tutorial #2 - HTTP Requests

Поділитися
Вставка
  • Опубліковано 5 лют 2025
  • Hey gang, in this Async JavaScript tutorial we'll take a look at what HTTP requests are and how they are made under the hood. Later we'll use the Fetch API to make these requests.
    Get the full Modern JavaScript tutorial on Udemy here (discount auto-applied):
    www.thenetninj...
    🐱‍👤🐱‍👤 JOIN THE GANG -
    / @netninja
    ----------------------------------------
    🐱‍💻 🐱‍💻 My Udemy Courses:
    Modern JavaScript - www.thenetninj...
    Vue JS & Firebase - www.thenetninja...
    D3.js & Firebase - www.thenetninj...
    🐱‍💻 🐱‍💻 Helpful Links:
    Get VS Code - code.visualstu...
    🐱‍💻 🐱‍💻 Social Links:
    Facebook - / thenetninjauk
    Twitter - / thenetninjauk
    Instagram - / thenetninja

КОМЕНТАРІ • 105

  • @a7medev
    @a7medev 4 роки тому +121

    THE BEST INSTRUCTOR IN THE WORLD 💙💙

  • @falsifyingdream
    @falsifyingdream 3 роки тому +35

    It's so helpful that you're mostly focusing on HTTP requests for this tutorial. I've seen so many others that barely use anything except setTimeout(), and while that's okay for a simple example, you're hardly ever going to be using that with async code in practice. Thank you for teaching us with something we'll actually use!

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

    this series concept was hardest to understand for me when I just started coding... and I remember this series made it easy for me... I wish I could like it several times ♥

  • @pranaydas7382
    @pranaydas7382 4 роки тому +15

    Almost a year ago i bought this course from udemy... its amazing .. It helped me to get job as chrome extension dev. thanks man !

  • @alasdairmacintyre9383
    @alasdairmacintyre9383 3 роки тому +7

    You're seriously the best teacher man. I go through tutorials online like the codecademy fullstack curriculum or the odin project so I can see what I need to learn, but I always come to your channel to really learn it and you explain everything so much more clearly and comprehensively than anyone else.

  • @raymondmichael4987
    @raymondmichael4987 4 роки тому +7

    I've been blankly listening to any UA-cam notification, hoping to see the new series.
    This ninja wagon, always rolling

  • @yasha6466
    @yasha6466 2 роки тому +3

    Hello Shaun, I'd like to express my sincere appreciation towards your free courses in this channel. I'm currently transiting from frontend to backend, and some JS concepts always give me a hard time. I accidentally discovered your channel and your explanations always woah me for their clarity. How I wish every teachers could have the same simple yet powerful teaching style like yours!

    • @NetNinja
      @NetNinja  2 роки тому

      Thank you for the kind words Yasha, I'm glad you're finding the courses helpful :)

  • @fredpourlesintimes
    @fredpourlesintimes 3 роки тому +1

    Normally, these details are boring, but you make them so exciting/enjoyable.

  • @vincentiusherie
    @vincentiusherie 2 роки тому +1

    Part 2 to part 4 of this series is incredibly useful for me because most of the other tutorials i have watched didn't explain in detail what happen when we make http request. You are a fantastic teacher, a very good communicator. Thank you so much for your videos!

  • @promiseigbosonu1455
    @promiseigbosonu1455 2 роки тому +2

    Your explanations are just the best up to the point that if it’s not your channel I find it difficult going to others channel

  • @BoardState
    @BoardState 2 роки тому +4

    To anyone who is a very early learner, you have to have an .HTML file connected to your .JS file and linked with a tag. The screen that Net Ninja refers to at 6:41 is the .HTML file displayed in the browser that has the tag to their respective .JS file linked.

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

      but how do we run the file in localhost?

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

      @@priteshsahu8645 open the html file in your web browser

  • @antoniuskonovalov
    @antoniuskonovalov 2 роки тому

    Omg sir, thank you! Had no idea why my lecturer was talking about Axios, API and stuff until I sew your video. Big relief!

  • @samirvaliyev
    @samirvaliyev 4 роки тому +1

    The best javascipt teacher I have ever seen

  • @aanarmath
    @aanarmath 3 роки тому +1

    You are the one of few in this area that really deserves "like". I wish there would be a different button for UA-camrs like you. Cheers

  • @cb-99-46
    @cb-99-46 3 роки тому

    after bunch of videos on this topic in youtube , finally i found the right and easy to understand video

  • @abdulazeezolanrewaju843
    @abdulazeezolanrewaju843 4 роки тому +2

    Your explanation is superb, one love from Nigeria!

  • @jalaliyev
    @jalaliyev 4 роки тому +1

    Bommm you r my best instructor in the UA-cam and I wanna learn Async Js a long time. THANK YOU SOOOOO MUCH MY BEST🖤🔥

  • @jonathanfuss3611
    @jonathanfuss3611 2 роки тому +1

    Exactly what I've been looking for! Thank you for the detailed and very understandable explanation🙏

    • @NetNinja
      @NetNinja  2 роки тому

      No problem Jonathan, hope it was helpful! :)

  • @valdoamaral2422
    @valdoamaral2422 4 роки тому

    Excited already for the next video

  • @anshuldakshprajapati170
    @anshuldakshprajapati170 4 роки тому +1

    Love the way u explain in depth . U are great Instructor :)

  • @javadmohammadi3943
    @javadmohammadi3943 3 роки тому

    thanks, ninja I learned a lot of things when I meet your Chanel

  • @PAKGOV
    @PAKGOV 4 роки тому

    ur tutorials are amazing ... especially for new students

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

    Thank you man, you are a great teacher👍

  • @mohammedeleriaan5986
    @mohammedeleriaan5986 3 роки тому

    Thank you for all the effort to explain this knowledge in a simple way & for free :).

  • @jamshidbeknabijonov922
    @jamshidbeknabijonov922 4 роки тому +2

    I got enough paid courses, but I came here to learn it

  • @lovelife-xm2xj
    @lovelife-xm2xj 2 роки тому

    You are asome teacher....I have never seen.... Pls make a videio about...real DOM mnipulation with server validation....like xml http request method

  • @aamirjamal6833
    @aamirjamal6833 4 роки тому

    Waiting eagerly for the next video

  • @akn9699
    @akn9699 4 роки тому

    Shaun is Love !

  • @mohammedbasith2898
    @mohammedbasith2898 3 роки тому

    I am your hardcore fan ❤️❤️❤️❤️🔥🔥🔥🔥

  • @thefin4lb0ss
    @thefin4lb0ss 4 роки тому

    Great series as always man

  • @velrinblack5447
    @velrinblack5447 4 роки тому +2

    One human made a mistake and hit unlike button 😂
    Great one ninja!

  • @梁永霖-o6u
    @梁永霖-o6u 4 роки тому

    best tutorial i ve ever seen!

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

    8:25. Why readyState when you do not dropdown the XMLHttpRequest is different to the XMLHttpRequest has been dropped ?

  • @AbleMagbegor-rj8jw
    @AbleMagbegor-rj8jw 6 місяців тому

    wow that was a first class explanation

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

      Glad it was helpful!

    • @agumichael-gc2fu
      @agumichael-gc2fu 2 місяці тому

      I want to purchase your modern JavaScript udeme course.
      How will I do it?

  • @ganeshvategaonkar351
    @ganeshvategaonkar351 3 роки тому

    Nice video👍

  • @alessandrosalzo
    @alessandrosalzo 4 роки тому +2

    Hello man, could you make a Nginx tutorial in the future? I would love to see it. Awesome videos btw, keep the good work. You have helped me a lot.

  • @NathanBudd
    @NathanBudd 4 роки тому

    This is cool... I went down a bit of a rabbit hole on a Google search of "can/does async use a different thread", and ended up looking into Web Workers. Couldn't see that you had a video about these though? Any plans?

  • @saadowain3511
    @saadowain3511 4 роки тому

    Amazing. Finally i got it
    Thanks a lot

  • @techjavaid6177
    @techjavaid6177 4 роки тому

    The best of the best in the world

  • @LoveLiveAndCode
    @LoveLiveAndCode 4 роки тому

    Yes yes...
    Thanks so much my Ninjah...

  •  4 роки тому

    superb explanation. thank you very much.

  • @OlehBiblyi
    @OlehBiblyi 4 роки тому

    This is what we need!

  • @nanayeboah475
    @nanayeboah475 3 роки тому

    hey Shaun, am not done with your javascript on udemy but this is a humble request, I really want to learn react Native from you so please make a course on that thanks🧡💙

  • @sauravjain6135
    @sauravjain6135 4 роки тому

    Yor are real ninja⁦❤️⁩⁦❤️⁩

  • @DevsLikeUs
    @DevsLikeUs 4 роки тому

    Great tutorial!

  • @nonchalant8473
    @nonchalant8473 4 роки тому

    Great tutorial. Thanks!

  • @NuubiKakku
    @NuubiKakku 4 роки тому

    Very helpful, thank you

  • @AbhishekAggarwalKMC
    @AbhishekAggarwalKMC 3 роки тому +1

    can you please explain how can we call addEventListener function before even pulling an HTTP request (i.e. request.open) ?

  • @ai.aspirations
    @ai.aspirations 3 роки тому

    Perfect! Thanks much!

  • @MaxProgramming
    @MaxProgramming 4 роки тому +1

    Why The Net Ninja is not asynchronous?
    Anyways. You do a lot of hard work 💜.
    Thank you for all of your tutorials

  • @mrinalkantisaha222
    @mrinalkantisaha222 4 роки тому

    Awesome content.

  • @ahmedyasser5942
    @ahmedyasser5942 4 роки тому

    Very helpful

  • @joedu7320
    @joedu7320 3 роки тому +1

    Hey, does anyone know why he put request.addEventListener(....) on top of request.send(). In this case, how could it get data before sending the request?

  • @_rachid
    @_rachid 4 роки тому

    Thank you 🙏❤

  • @KevinTempelx
    @KevinTempelx 4 роки тому

    Thanks!

  • @agumichael-gc2fu
    @agumichael-gc2fu 2 місяці тому

    Please I want to purchase your modern JavaScript series, how will I do it?

  • @thomaspynchon8400
    @thomaspynchon8400 4 роки тому

    Can you make one on data structure and algorithm? I've tried other videos but I can't seem to fathom it.

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

    I CAN'T FIND THE PARTICULAR REPO FOR ASYNC JAVASCRIPT. WHICH LESSON NUMBER IS IT?

  • @xC-db6st
    @xC-db6st 4 роки тому

    Unrelated, but have you got any plans for releasing a series about any ORMs, whether that's TypeORM or Sequelize?

  • @Martin958
    @Martin958 3 роки тому

    Why do we not see readyState 0 in this example? open ( ) was not called initially when the addEventListener was first encountered.

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

      im guessing the state was 0 to begin with and the event gets triggered when the state changes so it never logged state 0;

    • @Martin958
      @Martin958 7 місяців тому +1

      ​@@saurabhkunwar806 I think the addEventListener() method attaches an event handler to the document which is always present and listening to the document, so it only fires when it encounters a 'readystatechange'.
      I assumed it must fire immediately as it was the line first encountered in the code. But it only fires when a listen event is triggered on the document object.
      After the open( ) and send( ) methods are called, the 'readystatechange' property then gets heard when it changes, hence 1 is the first one encountered after the open( ) method has been executed.

  • @AngelOfDeath943
    @AngelOfDeath943 4 роки тому

    can you do series on native android development

  • @captsiro233
    @captsiro233 4 роки тому

    Can I take any information from any website, such as title, number or paragraph, and then render it on my own website?

  • @pranavjain4456
    @pranavjain4456 2 роки тому

    why is ready state 0 isn't logged into console?

  • @ridl27
    @ridl27 4 роки тому

    ty.

  • @arielvardy2269
    @arielvardy2269 3 роки тому

    question. How is he linking his code to the browser? when he saves it in VS code, what did he do to have it open in a browser? it is a .js file, so confused how to find it in a web-browser :/

    • @NetNinja
      @NetNinja  3 роки тому

      Hey, it's a package for VS Code called Live Server :)

    • @arielvardy2269
      @arielvardy2269 3 роки тому

      @@NetNinja thanks for the quick reply!! I actually ended up using the index.html and adding a script tag with a src attribute, and then coping my source (to .html file) into the web browser.
      What would be the benefit of using the Live Server package as apposed to just loading the HTML in the browser (with script tag)

  • @khammassihoussemeddine1193
    @khammassihoussemeddine1193 2 роки тому

    jsut pay attention to the fact that synchronous calls with XmlHttpRequest is depricated

  • @abhishektanwar7902
    @abhishektanwar7902 4 роки тому +8

    When will you start MERN stack. Eagerly waiting for that.🔥

    • @maskman4821
      @maskman4821 4 роки тому +2

      nextjs is way much better than mern !!!

    • @jmbeatsbbx
      @jmbeatsbbx 4 роки тому

      @@maskman4821 i bet both have their advantages and disadvantages

  • @RameenFallschirmjager
    @RameenFallschirmjager 4 роки тому

    Hello master ninja! I have a request from you! I can't wrap my head around giving a function as an argument to another function, it's too complicated for me. Tell me how can I learn this kind of programming. Am I too banana to understand this?!

  • @erikvberkel5490
    @erikvberkel5490 3 роки тому

    I'm following a coding class right now, and every time I don't understand something youtube, --> net ninja + subject I need to learn.

  • @mikoajpaszkowski2985
    @mikoajpaszkowski2985 4 роки тому

    October 2020, who is watching ? 😁

  • @indianlongboarder2844
    @indianlongboarder2844 4 роки тому +1

    Can we expect an update to react js also

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

    hey where is the github url?

  • @Cherupakstmt
    @Cherupakstmt 4 роки тому

    Can you make UA-cam video or Udemy course on fastify framework of nodejs.

  • @cubedev4838
    @cubedev4838 4 роки тому

    How many episode?

  • @MrVisheshsingh
    @MrVisheshsingh 4 роки тому

    😻

  • @whalewalker9176
    @whalewalker9176 4 роки тому +20

    Who is watching this today?

  • @lovelife-xm2xj
    @lovelife-xm2xj 2 роки тому

    I love....u ....like anything