The difference between the version which doesn't
# Show this #!? cookie print Dumper $cookie if $option->{verbose}; # list archives $request = HTTP::Request->new( GET => "https://$option->{hostname}/storiqone-backend/api/v1/archi +ve/" ); $request->content_type('application/json');
and the version which just frigging works
# list archives $request = HTTP::Request->new( GET => "https://$option->{hostname}/storiqone-backend/api/v1/archi +ve/" ); $request->content_type('application/json'); $request->header('Cookie' => $cookie);
is that in the former you don't add the cookie to the request header, but in the latter you do. What do you expect? Do you expect that $ua shoehorns its cookie-jar into the new HTTP::Request object? You are expecting too much magic, I guess ;-)
In reply to Re: LWP::UserAgent doesn't send my HTTP::Cookies
by shmem
in thread LWP::UserAgent doesn't send my HTTP::Cookies
by wazoox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |