Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

NTLM authentication fails with WWW:Mechanize, fine with LWP::UserAgent

by reasonablekeith (Deacon)
on May 22, 2009 at 10:09 UTC ( #765651=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use LWP::UserAgent;
    my $ua = new LWP::UserAgent('keep_alive' => '1');
    ...
    $ua->credentials('intranet:80', '', "domain\\user", 'pass');
    my $response =$ua->get($url);
    print $response->code();
    
  2. or download this
    use WWW::Mechanize;
    my $mech = WWW::Mechanize->new('keep_alive' => 1);
    ...
    $mech->credentials('intranet:80', '', "domain\\user", 'pass');
    $mech->get( 'http://intranet/mypage' );
    print $mech->status();
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://765651]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2019-12-14 00:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?