Net::HTTP2::Client::Connection::AnyEvent
my $cv = AnyEvent->condvar(); my $h2 = Net::HTTP2::Client::Connection::AnyEvent->new("perl.org"); $h2->request("GET", "/")->then( sub ($resp) { print $resp->content(); }, )->finally($cv); $cv->recv();
This class extends Net::HTTP2::Client::Connection to work with AnyEvent.
It requires that Net::SSLeay support ALPN.
To install Net::HTTP2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::HTTP2
CPAN shell
perl -MCPAN -e shell install Net::HTTP2
For more information on module installation, please visit the detailed CPAN module installation guide.