'serialize cookies to send with https & electron
I want to get the cookies for a website to then send a get request to get specific items in the page I'm expecting, but for that I need to parse my cookie object to normal cookies to send with the request, how would I do that?
This is the cookie object I have:
[
{
name: 'PrestaShop-0aa17d6277372fd3fab8b8cb30e02692',
value: 'cookie_value',
domain: '.radiantcheats.net',
hostOnly: false,
path: '/',
secure: false,
httpOnly: true,
session: false,
expirationDate: 1646261182.476999,
sameSite: 'unspecified'
},
{
name: 'PrestaShop-196abe789f95f684ba8d0b78d562974a',
value: 'cookie_value',
domain: '.radiantcheats.net',
hostOnly: false,
path: '/',
secure: true,
httpOnly: true,
session: false,
expirationDate: 1646261181.477107,
sameSite: 'unspecified'
},
{
name: '__tawkuuid',
value: 'cookie_value',
domain: 'domain',
hostOnly: false,
path: '/',
secure: false,
httpOnly: false,
session: false,
expirationDate: 1660170817,
sameSite: 'lax'
}
]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|