Fetch Headers and Why They Matter

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

КОМЕНТАРІ • 27

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

    Love how these videos are kept as simple as possible, but are still explained properly without all the waffle. Definitely my go to channel.

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

    Everytime I visit this channel I always find something which I don't know and then starts to learn it🙂

  • @codesader
    @codesader 3 роки тому +4

    This is powerful. I have always known there was more to the headers. I just didn't know it was this much. I bet this is just even a tip of the iceberg.
    Great content!

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

    Correction, I think important for newbies: arrays are not key-value pairs, an array is an ordered list aka index-value pairs (arrays don't have named keys like objects do).
    Good vids, love your work, thanks a mil 👍

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

    Very very useful,
    I was looking into 'Lorem Picsum' - Rndom Image Generator API,
    and wanted to control the response
    Thank You so much.

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

    This is the best explaination about headers

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

    Love you Steve you are a true GEM. Thank you for your lovely tutorials. 🙂

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

    I came in to learn something and with that learned something else as well. thanks as always.

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

    Thanks!

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

    why tutorials doesn't touch the necessary part which is setting the headers in the request.

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

    That's us great man thanks ❤️❤️❤️

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

    i'm sorry but something is confusing me in the code. but it's not realy related to the vid.
    how does a for of loop work with resp.headers
    if resp.headers is an object?
    doesn't a for of loop only works with itterables?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  3 роки тому +1

      The headers object itself is iterable.
      It works the exact same way as if you used
      for( let entry of myHeaders.entries() ){ }
      developer.mozilla.org/en-US/docs/Web/API/Headers/entries

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

      @@SteveGriffith-Prof3ssorSt3v3 I really appreciate the quick answer, steve.
      it helped a lot.
      thank you very much, i love your channel !!

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

    hello this does not work on a mobile or even any phone wifi for json why?

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  2 роки тому

      Most likely you are missing the response header from the server. The client side code should work everywhere.

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

      @@SteveGriffith-Prof3ssorSt3v3 hello i tried many differnt lines of code and it never worked Lisa

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

    You should start a blog.

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

    I'll be honest: I know nothing about headers except for what they are (I'd say some kind of array of information that's returned with a file) lmao

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  3 роки тому +3

      That is actually a pretty good description. When you send an HTTP request it has a header, body, and footer. The HTTP response also has those three things. the body is where the uploaded or downloaded file (or formatted data) goes. The header is the description of where it is going, where it came from, and other meta information. The footer is for verifying that you have the whole thing.

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

    awesome!

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

    Hi bro..
    How to fetch single data from database using JavaScript
    Make a video for this

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

    First viewer😁