JavaScript Fetch API and Cross-Origin Resource Sharing (CORS)

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

КОМЕНТАРІ • 13

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

    beautiful explanation...I have gone through a lot of videos but this was the simplest one to understand

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

      Thank you! I'm here to help!

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

    Lifesaver, I was checking my client code instead of the api code, holy. Thank you so much

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

    Great content Matthew, Thank you for that in depth explanation!

  • @againstthegrain5914
    @againstthegrain5914 2 роки тому +8

    this was a waste of time. you just showed everyone you didnt get any errors when you changed URL's. Would had been nice to see ya implement that into some code

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

      This video was focused on explaining what CORS is and the options clients can take when interacting with a server that is not properly setting CORS headers. It was not focused on implementing the server code.

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

    But if you REALLY want to use that API that don't follow the CORS standard, how do you do it from a pure client application?

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

      You can't. The browser won't let you do that. The HTTP clients are happy to connect to whatever endpoint you want but the browser is the one that'll deny it based on CORS.

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

    Thank you! Great video!

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

    Thanks for this

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

    Very helpful _ golden.

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

    Honda here