Slide 4
Slide 4 text
Protocol::HTTP2
# Prepare http/2 request
$client->request(
':scheme' => "http",
':authority' => $host . ":" . $port,
':path' => "/hello",
':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;
},
);
• Connect AnyEvent ͰΰχϣΰχϣΔ