HTTPS/Client-authenticated: Difference between revisions
Content added Content deleted
mNo edit summary |
|||
Line 43: | Line 43: | ||
<lang Mathematica>a = RunThrough["curl -E myCert.pem https://www.example.com", 1] |
<lang Mathematica>a = RunThrough["curl -E myCert.pem https://www.example.com", 1] |
||
For[ i=0, i < Length[a] , i++, SomeFunction[a]]</lang> |
For[ i=0, i < Length[a] , i++, SomeFunction[a]]</lang> |
||
=={{header|Perl}}== |
|||
<lang python>#!/usr/bin/env perl -T |
|||
use 5.018_002; |
|||
use warnings; |
|||
use LWP; |
|||
our $VERSION = 1.000_000; |
|||
my $ua = LWP::UserAgent->new( |
|||
ssl_opts => { |
|||
SSL_cert_file => 'certificate.pem', |
|||
SSL_key_file => 'key.pem', |
|||
verify_hostname => 1, |
|||
} |
|||
); |
|||
my $req = HTTP::Request->new( GET => 'https://www.example.com' ); |
|||
my $res = $ua->request($req); |
|||
if ( $res->is_success ) { |
|||
say $res->content; |
|||
} |
|||
else { |
|||
say $res->status_line; |
|||
}</lang> |
|||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |