bigup401 has asked for the wisdom of the Perl Monks concerning the following question:
am still getting 401 Authorization Required bt my username and password is ok
my $req = HTTP::Request->new(POST => 'link'); $req->content_type('application/json'); $req->header('Authorization' => "Basic" .encode_base64('cv23gwyzqvur:t +y7idfphrkl')); $req->content('{"name":"john deo","country":"ca","email":"joshn@email. +com") my $res = $ua->request($req); if ($res->is_success) { print $res->content; } else { print $res->status_line; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: lwp authorization
by haukex (Archbishop) on May 18, 2017 at 12:26 UTC | |
by bigup401 (Pilgrim) on May 18, 2017 at 13:10 UTC | |
Re: lwp authorization
by hippo (Bishop) on May 18, 2017 at 12:50 UTC | |
by bigup401 (Pilgrim) on May 18, 2017 at 13:13 UTC | |
by poj (Abbot) on May 18, 2017 at 13:54 UTC | |
by bigup401 (Pilgrim) on May 18, 2017 at 16:18 UTC | |
| |
Re: lwp authorization
by Mr. Muskrat (Canon) on May 18, 2017 at 17:04 UTC | |
by bigup401 (Pilgrim) on May 18, 2017 at 19:27 UTC |
Back to
Seekers of Perl Wisdom