问题
How to set withCredentials=true to fetch which return promise.
Is the following correct :
fetch(url,{
method:'post',
headers,
withCredentials: true
});
I think the MDN documentation talked about everything about http-requesting except this point: withCredentials
回答1:
Got it here :
credentials: 'include'
and not
withCredentials: true
来源:https://stackoverflow.com/questions/40543372/set-withcredentials-to-the-new-es6-built-in-http-request-api-fetch