Add a paragraph to summarize the motivation for releases since 5.815
[libwww-perl-eserte.git] / t / misc / get-file
blob8330ea758ebf5d743da7f57eb5b844684485d476
2 $file = shift || "";
3 $to = $file;
4 $to =~ s|.*/||;  # only basename
5 $to = "index.html" unless length $to;
7 use LWP::Debug qw(+);
9 use LWP::UserAgent;
11 $ua = new LWP::UserAgent;
12 #$ua->agent("get-file/0.1");
13 #$ua->from('aas@sn.no');
15 $res = $ua->request(HTTP::Request->new("GET", "http://localhost:8080/$file"), "$to");
17 #print $res->request->as_string;
18 print $res->as_string;
20 print "Content saved in $to\n" if $res->is_success;