Net::HTTP2::Client::Connection::IOAsync
my $loop = IO::Async::Loop->new(); my $h2 = Net::HTTP2::Client::Connection::IOAsync->new( $loop, 'perl.org' ); $h2->request("GET", "/")->then( sub ($resp) { print $resp->content(); }, )->finally( sub { $loop->stop() } ); $loop->run();
This class extends Net::HTTP2::Client::Connection to work with IO::Async.
It requires IO::Async::SSL, which as of this writing is a separate distribution.
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.