browser icon indicating copy to clipboard operation
browser copied to clipboard

Pass in cookies / dump out cookies?

Open skilbjo opened this issue 2 months ago • 0 comments

how does lightpanda handle cookies for a given request? ie let's say i make a request to google.com which 301 redirects to www.google.com but sets a cookie, in the subsequent request to www.google.com is the cookie sent/persisted?

can i use lightpanda to pass in cookies?

alternatively, can i use lightpanda cli to dump cookies at the end of a request?

the interface could be something like (to pass in cookies) (interface is up to you, but this is just an idea):

./lightpanda --dump --cookies 'cookie-str [or cookie-json]' 'https://news.google.com'

and to get cookies out:

./lightpanda --dump --dump-cookies --cookies 'cookie-str [or cookie-json]' 'https://news.google.com'

=> 
{
  dom: '<html> ... </html>',
  cookies: 'cookie-json'
}

skilbjo avatar Dec 13 '24 22:12 skilbjo