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

Answers:

Answer

Got it here :

  credentials: 'include'

and not

  withCredentials: true

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.