in reply to Re: Lwp and NTLM authentication
in thread Lwp and NTLM authentication

If $ua->env_proxy; doesn't work, here is another example I have used in the past.

sub GetURL { ########## # # GetURL is a generic LWP sub used to GET a URL using the provided # proxy settings, upon success it returns the page content +s or UNDEF # ########## my $url = shift; my $userAgent = new LWP::UserAgent; $userAgent->timeout( 3 ); # 3 sec timeout $userAgent->proxy( 'http' , $PROXY ) if $PROXY; my $request = HTTP::Request->new( GET => "$url" ); $request->proxy_authorization_basic( $USERNAME , $PASSWORD ) if $P +ASSWORD; my $result = $userAgent->request( $request) ; if ( $result->is_success ) { return $result->content; } return undef; }

Replies are listed 'Best First'.
Re^3: Lwp and NTLM authentication
by codeacrobat (Chaplain) on Feb 10, 2012 at 15:31 UTC
    Is there really no need to use of Authen::NTLM / LWP::Authen::Ntlm?
    Is it really going to set NTLM authentication whereas proxy_authorization_basic suggests that HTTP Basic authentication is used??

    print+qq(\L@{[ref\&@]}@{['@'x7^'!#2/"!4']});