數據請求 Fetch

先看一下 Fetch 原生支持率: Fetch 常見坑 Fetch 請求默認是不帶 cookie 的,需要設置 fetch(url, {credentials: 'include'}) 服務器返回 400,500 錯誤碼時並不會 reject,只有網絡錯誤這些導致請求不能完成時,fetch 纔會被 reject。 基本用法: fetch(url, option).then(function (re
相關文章
相關標籤/搜索