JavaScript - XMLHttpRequest and AJAX

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ก.ย. 2024

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

  • @ianbdb7686
    @ianbdb7686 ปีที่แล้ว +3

    thanks man!

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

  • @ghury1
    @ghury1 11 หลายเดือนก่อน +1

    how to create an javascript interceptor, that intercept every xmlHttpRequest, and show an alert each time the xmlHttpRequest goes in error or errorCode is != 200?

    • @WittCode
      @WittCode  20 วันที่ผ่านมา

      Howdy! I would create a custom function that wraps fetch. On the response check the status code. If it is not resp.ok you could do the alert! Whenever you make an API call use this custom function.

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

    thanks bud

  • @MarkaTaylor-y6h
    @MarkaTaylor-y6h 21 วันที่ผ่านมา

    Jackson Susan Moore Joseph Garcia Sharon

    • @WittCode
      @WittCode  20 วันที่ผ่านมา

      👋