newperldeveloper has asked for the wisdom of the Perl Monks concerning the following question:
I have a curl command curl --cert ~/Desktop/file.pfx:secret_key --cert-type P12 https://example.com/token
The above will return a a json object.
How would I go about achieving the same results in perls.
I've tried using
This returns a 500 error.use LWP::UserAgent qw(); require LWP::Protocol::https; my $ua = LWP::UserAgent->new; $ua->ssl_opts( SSL_ca_file => '/Downloads/file.pfx', ); my $test = $ua->post('https://example.com/gettoken');
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to convert curl authentication method to perl (client certificate)
by hippo (Bishop) on Feb 28, 2020 at 16:53 UTC | |
by newperldeveloper (Sexton) on Feb 28, 2020 at 19:27 UTC | |
by Corion (Patriarch) on Feb 28, 2020 at 19:58 UTC | |
Re: How to convert curl authentication method to perl
by Corion (Patriarch) on Feb 28, 2020 at 16:52 UTC | |
by newperldeveloper (Sexton) on Feb 28, 2020 at 17:15 UTC |
Back to
Seekers of Perl Wisdom