NAME
Unblock::HTTP3::Client - one client HTTP/3 connection
SYNOPSIS
use Uniform::HTTP::Request;
use Unblock::HTTP3::Client;
my $client = Unblock::HTTP3::Client->new(
quic => $quic,
);
$client->start;
my $transaction = $client->request(
Uniform::HTTP::Request->new(
method => 'GET',
target => '/',
scheme => 'https',
authority => 'example.com',
),
on_response => sub {
my ($transaction, $response) = @_;
},
on_body => sub {
my ($transaction, $response, $bytes) = @_;
},
on_complete => sub {
my ($transaction) = @_;
},
);
DESCRIPTION
A Client owns HTTP/3 protocol state for one existing Net::QUIC connection.
It does not own UDP sockets, TLS, timers, or an event loop.
request() accepts the Uniform HTTP request contract and returns an Unblock::HTTP3::Transaction.
Useful per-request callbacks are:
on_informational
on_response
on_body
on_complete
on_error
on_drain
Pass stream_body => 1 to produce a request body with the Transaction write() and end() methods.
The pull interface remains available through next_transaction() and next_informational().
SEE ALSO
Unblock::HTTP3, Unblock::HTTP3::Transaction, Uniform::HTTP::Request
LICENSE
MIT License.