in reply to LWP::UserAgent doesn't send my HTTP::Cookies
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 ;-)
perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: LWP::UserAgent doesn't send my HTTP::Cookies
by Anonymous Monk on Jul 01, 2016 at 19:29 UTC | |
by wazoox (Prior) on Jul 05, 2016 at 11:14 UTC | |
by Corion (Patriarch) on Jul 05, 2016 at 11:22 UTC | |
by wazoox (Prior) on Jul 06, 2016 at 15:21 UTC | |
Re^2: LWP::UserAgent doesn't send my HTTP::Cookies
by wazoox (Prior) on Jul 05, 2016 at 11:24 UTC |
In Section
Seekers of Perl Wisdom