Hi,
We are using dancer2, how can I fetch an existing cookie from the client requests?
In dancer1, there is module Dancer::Cookies, we can retrieve all the cookies by doing: my $cookies = Dancer::Cookies->cookies;
See the following:
use Dancer::Cookies;
my $cookies = Dancer::Cookies->cookies;
foreach my $name ( keys %{$cookies} ) {
my $cookie = $cookies->{$name};
my $value = $cookie->value;
print "$name => $value\n";
}
Does Dancer2 has equivalent module or are there any ways to fetch a cookie?
Your help would be much appreciated!
Best,
Wendy