Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
256 views
in Technique[技术] by (71.8m points)

javascript - set withCredentials to the new ES6 built-in HTTP request API : Fetch

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Got it here :

  credentials: 'include'

and not

  withCredentials: true

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...