ovedpo15 has asked for the wisdom of the Perl Monks concerning the following question:
But it fails. $content contains: (I replaced the url with <url> for readability)my $mech = LWP::UserAgent->new(ssl_opts => { SSL_key_file => $key_path, SSL_passwd_cb => sub { return $pass; }, SSL_ca_file => $ca_path, SSL_cert_file => $crt_path, verify_hostname => 1, SSL_version => 'TLSv1' }); my $content = $mech->get($url); print Dumper($content);
Versions of modules:$VAR1 = bless( { '_content' => 'Can\'t connect to <url>', '_rc' => 500, '_headers' => bless( { 'client-warning' => 'Internal +response', 'client-date' => 'Thu, 01 Aug +2019 09:57:43 GMT', 'content-type' => 'text/plain' }, 'HTTP::Headers' ), '_msg' => 'Can\'t connect to <url>', '_request' => bless( { '_content' => '', '_uri' => bless( do{\(my $o = +'<url>')}, 'URI::https' ), '_headers' => bless( { 'user-a +gent' => 'libwww-perl/6.04' }, 'HTTP: +:Headers' ), '_method' => 'GET' }, 'HTTP::Request' ) }, 'HTTP::Response' );
I also unset HTTP_PROXY and HTTPS_PROXY before running the script (The code contains a check for that).WWW::Mechanize: 1.71 LWP : 6.04
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Performing a GET request with SSL
by 1nickt (Canon) on Aug 01, 2019 at 12:55 UTC | |
|
Re: Performing a GET request with SSL
by daxim (Curate) on Aug 01, 2019 at 12:41 UTC | |
|
Re: Performing a GET request with SSL
by TieUpYourCamel (Scribe) on Aug 01, 2019 at 13:21 UTC | |
|
Re: Performing a GET request with SSL
by bliako (Abbot) on Aug 01, 2019 at 20:35 UTC | |
by Anonymous Monk on Aug 02, 2019 at 07:39 UTC |