Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I wrote a perl script using WWW:Mechanize as I am trying to communicate with my link. when I execute the script, it is giving me "Unauthorized" error at line
then I read some nodes with similar issue and saw that adding below code solved their issue:$mech->get($url);
my $mech = WWW::Mechanize->new(); my @args = (Authorization => "Basic " .MIME::Base64::encode('USER:PASS ++')); $mech->get('http://mylink/', @args); $mech->get('http://mylink/'); $mech->credentials($username,$password);
but even by adding the authetication code, I am still seeing "Unauthorized" error.
Please Advise....
Thanks in Advance
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: New with WWW:Mechanize and Credentials issue
by ww (Archbishop) on May 12, 2009 at 20:18 UTC | |
|
Re: New with WWW:Mechanize and Credentials issue
by almut (Canon) on May 13, 2009 at 00:20 UTC | |
|
Re: New with WWW:Mechanize and Credentials issue
by Anonymous Monk on May 12, 2009 at 20:31 UTC | |
|
Re: New with WWW:Mechanize and Credentials issue
by imrags (Monk) on May 13, 2009 at 06:25 UTC |