Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

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

by marto (Cardinal)
on Jul 05, 2006 at 11:04 UTC ( [id://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.

Martin
  • 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 = 'www.yourhosthere.com:'; 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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-24 12:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found