NAME
Unblock::HTTP3 - non-blocking HTTP/3 protocol engine for Perl
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) = @_;
print $response->status, "\n";
},
);
DESCRIPTION
Unblock::HTTP3 is an HTTP/3 protocol engine.
It sits above Net::QUIC and uses the Uniform HTTP message contract. Exact canonical Uniform::HTTP::Request and Uniform::HTTP::Response objects use the native fast path. Adapters and subclasses use the portable Perl contract.
It does not own UDP sockets, timers, TLS configuration, or an event loop.
libnghttp3 is supplied through Alien::nghttp3 and is used for HTTP/3 framing and QPACK.
The public API is built around Unblock::HTTP3::Client, Unblock::HTTP3::Server, and Unblock::HTTP3::Transaction. The common application vocabulary intentionally matches the other Unblock HTTP engines: new(), request(), respond(), write(), end(), and send_informational().
HTTP/3-specific features such as Datagrams, Capsules, Extended CONNECT, 0-RTT, QPACK state, priorities, RESET_STREAM, and STOP_SENDING remain protocol-specific.
MODULES
- Unblock::HTTP3::Client
-
One client HTTP/3 connection over an existing Net::QUIC connection.
- Unblock::HTTP3::Server
-
One server HTTP/3 connection over an existing Net::QUIC connection.
- Unblock::HTTP3::Transaction
-
One HTTP request/response transaction carried by an HTTP/3 request stream.
- Unblock::HTTP3::Body::Stream
-
Advanced writable streaming-body API.
- Unblock::HTTP3::Body::Reader
-
Advanced readable streaming-body API.
- Unblock::HTTP3::NativeABI
-
Optional versioned native consumer ABI for XS integrations.
STANDARDS
Unblock::HTTP3 implements RFC 9114 with QPACK from RFC 9204. It also supports RFC 9218 priorities, RFC 9220 Extended CONNECT, RFC 9297 HTTP Datagrams and Capsules, and RFC 9412 ORIGIN.
QUIC transport behavior remains the responsibility of Net::QUIC.
SEE ALSO
Net::QUIC, Uniform::HTTP, Alien::nghttp3
AUTHOR
Joshua S. Day
LICENSE
This software is available under the MIT License.