in reply to lwp authorization
$req->header('Authorization' => "Basic" .encode_base64('cv23gwyzqvur:ty7idfphrkl'));
I would suggest that you don't try to set your own headers, have a look at the LWP::UserAgent docs for the credentials method instead, e.g.:
$ua->credentials("www.example.com:80", "Some Realm", "foo", "secret");
Note that if you wanted to debug this, one way would be to use Wireshark to capture both a successful authentication via the browser and a failed one from your script.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: lwp authorization
by bigup401 (Pilgrim) on May 18, 2017 at 13:10 UTC |