ExtendedConnectRequest class

An Extended CONNECT request (RFC 9220) used to bootstrap protocols such as WebTransport or WebSockets over HTTP/3.

In addition to the standard HTTP/3 pseudo-headers (:method, :scheme, :authority, :path), this request carries a :protocol pseudo-header that identifies the desired application protocol (e.g. "webtransport" or "websocket").

The :method is always "CONNECT".

Constructors

ExtendedConnectRequest({required String protocol, String scheme = 'https', required String authority, required String path, Map<String, String> headers = const {}, Uint8List? body})

Properties

authority String
The :authority pseudo-header.
final
body Uint8List?
Optional request body.
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
Regular HTTP headers (excluding pseudo-headers).
final
path String
The :path pseudo-header.
final
protocol String
The :protocol pseudo-header (e.g. "webtransport", "websocket").
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheme String
The :scheme pseudo-header (defaults to "https").
final

Methods

encodeHeaders({QpackEncoder? encoder}) Uint8List
Encode the request headers as a QPACK-encoded field section.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

decodeHeaders(Uint8List bytes) ExtendedConnectRequest
Decode a QPACK-encoded field section into an ExtendedConnectRequest.