Traced into LWP::UserAgent, and finally figured out that the parameters I passed into the credentials() call are wrong. Here is the fixed code:
use LWP::UserAgent; use HTTP::Request; use strict; use warnings; my $ua = new LWP::UserAgent(); $ua->credentials("localhost:8080", "Tomcat Manager Application", "peip +", "930612"); my $req; if ($ARGV[0] eq "remove") { $req = new HTTP::Request("GET", "http://localhost:8080/manager/rem +ove?path=/hello1"); } elsif ($ARGV[0] eq "install") { $req = new HTTP::Request("GET", "http://localhost:8080/manager/ins +tall?path=/hello1&war=jar:file:/jwstutorial13/examples/web/hello1/dis +t/hello1.war!/"); } my $res = $ua->request($req); print $res->content();
I will continue work on it, to add Tk and XML parts. But first... Hey, my turkey is done!
In reply to Re: problem with credentials() of LWP::UserAgent
by pg
in thread problem with credentials() of LWP::UserAgent
by pg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |