Help for this page

Select Code to Download


  1. or download this
    my $ua = LWP::UserAgent->new;
    my $uri = shift @ARGV;
    ...
    my $headres = $ua->simple_request($headreq);   # <----
    my $statuscode = $headres->code();        
    print "Status 401 at $uri\n" if $statuscode == 401;
    
  2. or download this
    my $ua = LWP::UserAgent->new;
    my $uri = shift @ARGV;
    ...
       my $final_uri = $headres->request()->uri();   # <----
       print "Status 401 at $final_uri\n" 
    }