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; }
In reply to lwp authorization by bigup401
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |