1
如何设置withCredentials=true
到fetch
哪些返回承诺。 是以下正确的:设置withCredentials到新的ES6内置的HTTP请求API:取
fetch(url,{
method:'post',
headers,
withCredentials: true
})
我觉得MDN documentation谈到的一切,除了这一点上的HTTP请求:withCredentials
它也在[官方规格](ht tps://fetch.spec.whatwg.org/#cors-protocol-and-credentials)以XHR为例 – CodingIntrigue