Answers for "react does not send the cookie automatically"

0

react does not send the cookie automatically

fetch and axios indeed do not send credentials automatically with the request,
you will have to specify it by setting the "withCredentials" option to true:

axios.get(`api.com/api`, { withCredentials: true })
  .then((res) => {
    // code
  })
Posted by: Guest on February-27-2021

Code answers related to "react does not send the cookie automatically"

Code answers related to "Javascript"

Browse Popular Code Answers by Language