Created
April 24, 2020 07:14
-
-
Save hollie/396b2905545032353ac3690dac3d3e69 to your computer and use it in GitHub Desktop.
Test script to check if HTTPS works with the current perl installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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