Hello Monks,
I am working with Apache2::REST, and can't seem to retrieve cookies from the request headers.
Apache2::REST::Request requires the $r request object, however i think Apache2::REST
sub GET { my ($self, $request, $response) = @_ ; } $request
is only the URL parameters.
I have tried variations of the following;
my $req = Apache2::Request->new($request->{r}); my $j = Apache2::Cookie::Jar->new($req); my @attESSec = $j->cookies();
I know i'm not connecting the dots here, any help would be greatly appreciated!
Thanks,
UPDATE
This is the easiest way I found to solve the issue;
sub GET { my ($self, $request, $response) = @_ ; my $c = $request->connection; my $cookies = $request->headers_in->{Cookie}; my %cookies = map { split(/=/) } split(/;/,$cookies);
I tried feeding $c and $cookies into Apache2::Cookie without luck
PS. Whats with my Submit button saying stumbit? s/stumbit/submit/ ?
In reply to Apache2::REST cookie retrieve by gman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |