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

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

КОМЕНТАРІ • 30

  • @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 11 місяців тому

    Thanks so much. I finally now understood the difference!

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

    Fantastic tutorial! Thank you so much!

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

    Your teaching style and content are just great.

  • @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 :)

  • @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

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

    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??

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

    Very helpful

  • @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/

  • @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.

  • @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: ua-cam.com/video/8JcCdp2Y4Q4/v-deo.html&t

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

      @@OpenJavaScript thank you for the link