React-electron app: react set cookie value

277 Views Asked by At

I am building an electron-react app, and when I make requests to some URLs I get cookie values included in the response object.

Then when I use other similar APIs, I have to send that cookie in the headers. So, I have to set the received cookie to the electron.session.

However, because of electron js, I cannot set a cookie with document.cookie = cookie.

How can I implement setting cookies?

enter image description here

When I use session in react.js, the folowing error appears enter image description here

I installed fs and path modules but did not fix anything

0

There are 0 best solutions below