in reply to Basic / Digest authentication in website
The information you posted is not sufficient, can you please tell also what you get using the code you showed?
I usually use LWP::UserAgent for GET request with authentication as follows:
use LWP::UserAgent; use HTTP::Request::Common; my ($url, $usr, $pwd, $endpoint, $realm) = @_; my $ua = LWP::UserAgent -> new; $ua -> credentials($endpoint, $realm, $usr, $pwd); my $response = $ua -> request(GET $url) -> as_string;
That is similar to the second code block you posted.
Update: It could be useful if you also post the real URL of the file you are trying to get as http://sub.example.com:49282/navigation/nav_home.shtml and http://server:49282/subpage/nav_home.shtml are not real addresses.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Basic / Digest authentication in website
by TheFlyingCorpse (Novice) on Jul 11, 2010 at 17:02 UTC | |
by ww (Archbishop) on Jul 11, 2010 at 17:29 UTC | |
by TheFlyingCorpse (Novice) on Jul 11, 2010 at 17:49 UTC |