in reply to Using LWP w/ HTTPS
Okay, here goes a brief sample (almost entirely from the LWP docs) that has not been tested at all:
#!/usr/bin/perl -w use strict; use LWP::UserAgent; my $ua = new LWP::UserAgent; my $req = HTTP::Request->new(GET => 'https://testing/weather.pl'); my $res = $ua->request($req); my $weather; if ($res->is_success) { $weather = $res->content; } else { die "download failed.\n"; } # the rest of your code goes here
|
|---|