How to use fetch in JavaScript: GET, POST, PUT and DELETE requests

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ม.ค. 2025

ความคิดเห็น •

  • @OpenJavaScript
    @OpenJavaScript  2 ปีที่แล้ว

    Thanks for watching!
    👉Source code and how to use fetch with async/await: openjavascript.info/2022/01/03/using-fetch-to-make-get-post-put-and-delete-

  • @gillesa290
    @gillesa290 2 ปีที่แล้ว +1

    Fetch is now so easy ! Thank you for sharing.

  • @sasikumar2554
    @sasikumar2554 2 ปีที่แล้ว +2

    Well explained, clear and concise and it helps a lot for a beginner to understand with out breaking the head. Love the way you explain things. Thanks a lot. Keep up the good work!

    • @OpenJavaScript
      @OpenJavaScript  2 ปีที่แล้ว

      Thanks for the feedback. Always try to keep the videos beginner-friendly :)

  • @michaelolawunmi464
    @michaelolawunmi464 2 ปีที่แล้ว +2

    Thank you so much! This was one of the best explanations i found on this topic.

  • @hananfadah
    @hananfadah ปีที่แล้ว

    Thanks so much. I finally now understood the difference!

  • @roadtripper17
    @roadtripper17 2 ปีที่แล้ว

    Your teaching style and content are just great.

  • @awakening7074
    @awakening7074 2 ปีที่แล้ว +1

    Fantastic tutorial! Thank you so much!

  • @febryramadhan1743
    @febryramadhan1743 2 ปีที่แล้ว +1

    how could this vidieos only get 6 likes? its the best videos i found for https request.. subscribed!!!

    • @OpenJavaScript
      @OpenJavaScript  2 ปีที่แล้ว

      Thank you for the feedback! And thanks for liking and subscribing - best way to support the channel :)

  • @pablopiccolo3723
    @pablopiccolo3723 21 วันที่ผ่านมา

    Hello. Why in 17.00 the requst is unseccesfull? Why put method does not save the json file on API?

  • @youssefosama973
    @youssefosama973 6 หลายเดือนก่อน

    if there is an element consisits of 20 elms
    and want to update one of whom(16 as exapmle)
    i will use put method
    but i won't write all the 19 elms again
    so what is the best practice here??

  • @aminalamdarloo349
    @aminalamdarloo349 2 ปีที่แล้ว +1

    Dear bro
    Tnx for your video .
    I need to know how i can appear the captcha code in busy or overloaded sites when tis not shown ( just show the image box not captcha code) by get and post method.

    • @OpenJavaScript
      @OpenJavaScript  2 ปีที่แล้ว

      Did you find a solution to your question?
      Google has pretty good resources, maybe you find the answer there: developers.google.com/recaptcha

  • @borgk8546
    @borgk8546 2 ปีที่แล้ว

    Thanks for this video, very useful and helpful information, for someone that's just starting. However I was wondering, if you are using checkboxes to delete the values in the frontend, how would you incorporate that in the fetch Delete request?

    • @OpenJavaScript
      @OpenJavaScript  2 ปีที่แล้ว

      If you want to do this 'live', you will need to add event listeners to the checkboxes and make an API call every time a user checks or unchecks.
      But probably a better solution is to have a 'Save Settings' button that when clicked checks the values of the checkboxes and then makes an API call that feeds it that data. The exact nature of the request depends upon the API but if you can do some backend programming to support this it would be more efficient.

  • @jasonandrews7080
    @jasonandrews7080 2 ปีที่แล้ว +1

    Very clear tutorial ! Can you share the sample code please?

    • @OpenJavaScript
      @OpenJavaScript  2 ปีที่แล้ว

      Thank you for the feedback!
      You can find the sample code for all fetch request types on my website:
      openjavascript.info/2022/01/03/using-fetch-to-make-get-post-put-and-delete-requests/

  • @Muhammad_X
    @Muhammad_X 2 ปีที่แล้ว

    Very helpful

  • @codecobber1107
    @codecobber1107 2 ปีที่แล้ว

    Just brilliant, thanks

  • @mohammadhosseinkhanzadi6701
    @mohammadhosseinkhanzadi6701 2 ปีที่แล้ว +1

    thank you man

  • @dzajakeks5539
    @dzajakeks5539 2 ปีที่แล้ว +1

    where async / await

    • @OpenJavaScript
      @OpenJavaScript  2 ปีที่แล้ว +1

      Async/await using Fetch: th-cam.com/video/8JcCdp2Y4Q4/w-d-xo.html&t

    • @dzajakeks5539
      @dzajakeks5539 2 ปีที่แล้ว

      @@OpenJavaScript thank you for the link