問題:
There is a new API for making requests from JavaScript: fetch()
.有一個用於從 JavaScript 發出請求的新 API: fetch()
。 Is there any built in mechanism for canceling these requests in-flight?是否有任何內置機制可以取消這些正在進行的請求?
解決方案:
參考一: https://stackoom.com/question/26KbO參考二: How do I cancel an HTTP fetch() request?