[dancer-users] how to fetch an existing cookie
Wanjuan Yang
wy1 at sanger.ac.uk
Mon Jul 17 15:39:16 BST 2017
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
--
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20170717/efc68681/attachment.html>
More information about the dancer-users
mailing list