Skip to content

Instantly share code, notes, and snippets.

@hollie
Created April 24, 2020 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hollie/396b2905545032353ac3690dac3d3e69 to your computer and use it in GitHub Desktop.
Save hollie/396b2905545032353ac3690dac3d3e69 to your computer and use it in GitHub Desktop.
Test script to check if HTTPS works with the current perl installation
#! /usr/bin/env perl
use LWP::UserAgent;
my $ua = LWP::UserAgent->new;
my $req = HTTP::Request->new(GET => 'https://google.com');
my $res = $ua->request($req);
if ($res->is_success) {
print $res->as_string;
} else {
print "Failed: ", $res->status_line, "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment