Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: Question on LWP::UserAgent attribute - $ua->credentials()

by marto (Archbishop)
on Jul 05, 2006 at 11:04 UTC ( #559303=note: print w/replies, xml ) Need Help??

in reply to Question on LWP::UserAgent attribute - $ua->credentials()

Anonymous Monk,

Perhaps you could detail exactly what you are trying to do? It sounds as to you are behind a proxy and are trying to access a page which required user authentication. You may want to look at the Proxy attributes in the LWP::UserAgent documentation. If this is no help, please post the complete code you have, the error message (in full) and a better description of your circumstances (for example, are you behind a proxy server that requires a username and password before you can view webpages) and what you are trying to achieve. Also please read the PerlMonks FAQ and How do I post a question effectively? if you have not already done so.

  • Comment on Re: Question on LWP::UserAgent attribute - $ua->credentials()

Replies are listed 'Best First'.
Re^2: Question on LWP::UserAgent attribute - $ua->credentials()
by Herkum (Parson) on Jul 05, 2006 at 11:37 UTC

    I have to agree, with marto here. You are saying you are getting a proxy error and you asking for help with credentials. Seems like two seperate issues. if you are positive that it is a credentials issues, here is a snippet that works for me,

    my $server = ''; my $port_no = 443; my $realm = 'Restricted Area'; # Make sure the text is an exact matc +h my $user = 'username'; my $passwd = 'password'; $ua->credentials( $server . $port_no, $realm, $user, $passwd );

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://559303]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2019-06-27 10:35 GMT
Find Nodes?
    Voting Booth?
    Is there a future for codeless software?

    Results (111 votes). Check out past polls.