':authority' => $host . ":" . $port, ':path' => "/minil.toml", ':method' => "GET", headers => [ 'accept' => '*/*', 'user-agent' => 'perl-Protocol-HTTP2/0.01', ], on_done => sub { my ( $headers, $data ) = @_; printf "Get headers. Count: %i\n", scalar(@$headers) / 2; printf "Get data. Length: %i\n", length($data); print $data; }, )->request( … );