|Perl Monk, Perl Meditation|
LWP HTTPS and a sore headby anchylo (Initiate)
|on Jul 15, 2009 at 20:02 UTC||Need Help??|
anchylo has asked for the wisdom of the Perl Monks concerning the following question:
Hello I am having difficulty downloading a file (and am tired of downloading them directly...
my $url = 'https://192.168.1.1/cgi-bin/get-sae-log.cgi?host=thingy&date=20090703'; # Yes, HTTPS! my $browser = LWP::UserAgent->new;
my $response = $browser->get($url);
die "Error at $url\n ", $response->status_line, "\n Aborting" unless $response->is_success; print "Whee, it worked! I got that ", $response->content_type, " document!\n"; <\code>
Whee, it worked! I got that application/x-bzip2 document!
ok, so i can see the document, but am at a loss as to how to name and download the file.
I have tried lwp-download, but got massive errors... any help appreciated.