Skip to content

Instantly share code, notes, and snippets.

Last active Oct 11, 2015
What would you like to do?
List a website's content encoding
use v5.16;
use warnings;
use autodie qw( :all );
use utf8::all;
use LWP::UserAgent;
use Data::Show;
my $url = '';
my $ua = LWP::UserAgent->new;
my $can_accept = HTTP::Message::decodable;
my $response = $ua->get( $url, 'Accept-Encoding' => $can_accept, );
show $response->{_headers};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment