question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Have a way to get all cookie names

See original GitHub issue

This library is wonderful for getting and setting individual cookies. I have a case where I need to get all cookies though.

It’d be nice to just re-use the get() function without specifying a key:

var cookies = new Cookies(req, res, keys);
var allCookies = cookies.get();

Thanks for your hard work!

Issue Analytics

  • State:open
  • Created 9 years ago
  • Reactions:2
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Rimincommented, Oct 9, 2021

i also want to get all cookies; it would be good if support;

1reaction
House3272commented, Oct 21, 2016

Has there been any progress on implementing this feature?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I list all cookies for the current page with Javascript?
const cookies = await cookieStore.getAll(); //Array of all available cookie info cookies.forEach(c => console.log(`${c.name}: ${c.value}`));.
Read more >
How to list all the cookies of the current page using JavaScript
Access the cookies using document.cookie. · Use the .split() method to split them on “;” to get an array of cookies. · Traverse...
Read more >
cookies.getAll() - Mozilla - MDN Web Docs
The getAll() method of the cookies API retrieves all cookies from a single cookie store that match the given information.
Read more >
Get all cookies with Javascript | The Electric Toolbox Blog
In my last jQuery post I looked at how to set, get and clear cookies with jQuery and now look at how to...
Read more >
JavaScript Cookies - W3Schools
Deleting a cookie is very simple. You don't have to specify a cookie value when you delete a cookie. Just set the expires...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found