[dancer-users] How to send back cookies in Dancer2 Tests?

Gabor Szabo gabor at szabgab.com
Wed Oct 30 16:26:03 GMT 2013


And a little more staring at the dump revealed the solution.
Instead of sending the cookie in the header back tot he server
I need to set an environment variable:

$ENV{HTTP_COOKIE} = $cookie;
my $r3 = dancer_response GET => "/";
is $r3->content, "get $t";

If you'd like to see this in action check out the repository:
https://github.com/szabgab/cookies


Gabor


More information about the dancer-users mailing list