in reply to Re^3: LWP::UserAgent and Cookies
in thread LWP::UserAgent and Cookies
This works fine for me:
#!/usr/bin/env perl use strict; use warnings; use LWP::UserAgent; use HTTP::Cookies; use Test::More tests => 1; my $cookie_jar = HTTP::Cookies->new; my $ua = LWP::UserAgent->new; $ua->cookie_jar ($cookie_jar); my $response = $ua->get ('https://twitter.com/'); like $cookie_jar->as_string, qr/guest_id=/, 'Cookie retrieved';
HTTP::Cookies 6.01, LWP::UserAgent 6.15.
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: LWP::UserAgent and Cookies
by jczeus (Monk) on Oct 27, 2021 at 11:13 UTC |