score:2

Accepted answer
fetch("http://localhost:8080/login", {
  method: "POST",
  body: new URLSearchParams(student)
  credentials: 'include', 
  headers: {
  'Content-Type': 'application/json'
  } 
  })
  .then(res=>console.log(res.headers.get('set-cookie'));)

  .catch(error => console.log(error));

Related Query

More Query from same tag