TsgcHTTP3Client › Methods
Public methods grouped by purpose, followed by the full alphabetical list.
The client implements the ten HTTP methods below. The list is exhaustive: it is the Th3Methods enumeration the component encodes into the :method pseudo-header of every request.
| Verb | Synchronous | Asynchronous | Stream overload | Default aContentType | Typical use |
|---|---|---|---|---|---|
GET | Get | GetAsync | Get(aURL, aResponseContent) | — | Retrieve a resource. No request body. |
POST | Post | PostAsync | Post(aURL, aSource, aResponseContent) | application/x-www-form-urlencoded | Submit data, typically to create a record or invoke an action. |
PUT | Put | PutAsync | Put(aURL, aSource, aResponseContent) | application/json | Replace the target resource. Idempotent. |
DELETE | Delete | DeleteAsync | Delete(aURL, aResponseContent) | — | Remove the target resource. No request body. |
HEAD | Head | — | — | — | Read status and headers only, no body. Returns TsgcHTTP3Response. |
PATCH | Patch | PatchAsync | Patch(aURL, aSource, aResponseContent) | application/json | Apply a partial update to the target resource. |
OPTIONS | RequestOptions | OptionsAsync | RequestOptions(aURL, aResponseContent) | — | Inspect the methods and capabilities a resource supports. |
TRACE | Trace | TraceAsync | Trace(aURL, aResponseContent) | — | Loop-back diagnostic. Often disabled by servers. |
CONNECT | Connect | ConnectAsync | — | — | Request a tunnel. See ExtendedConnect for a tunnel that stays open. |
QUERY | Query | QueryAsync | Query(aURL, aSource, aResponseContent) | application/x-www-form-urlencoded | Safe, idempotent request that carries a body. Suits search and filter payloads. |
Every verb above is reachable through a synchronous method that blocks and returns the response body as a string, and (except HEAD) an asynchronous method that returns immediately and delivers the reply on OnResponse.
Two naming points are worth knowing. OPTIONS is sent by the method named RequestOptions, because Options collides with an existing identifier in Delphi and C++Builder; its asynchronous counterpart keeps the protocol name and is OptionsAsync. CONNECT is sent by the Connect(aURL) overload, which is a different method from the Connect(aHost, aPort) overload that opens the QUIC connection. Both live on the Connect page.
HEAD is the exception to the pattern: it returns a TsgcHTTP3Response rather than a string, and it has neither an asynchronous variant nor a stream overload.
Every verb except HEAD and CONNECT also has a stream overload, which writes the response body into a TStream instead of building a string, and for body-carrying verbs reads the request body from a source stream. Use it for binary or large payloads. The stream overloads always send content-type: application/octet-stream and do not accept an aContentType parameter, so use the string overload when the media type matters.
The default aContentType column lists the value used by the string overload when the parameter is omitted. Pass it explicitly whenever the server expects something else, for example application/json on a Post.
| Name | Description |
|---|---|
| Connect | Opens the QUIC connection and performs the TLS 1.3 and HTTP/3 handshake. The URL overload sends the CONNECT verb. |
| Disconnect | Closes the HTTP/3 connection and the underlying QUIC transport. |
| Connected | Returns True when the HTTP/3 connection is currently open. |
| Name | Description |
|---|---|
| SetMaxPushId | Sends a MAX_PUSH_ID frame that raises the highest push ID the client accepts. Server push is disabled until this is called. |
| CancelPush | Sends a CANCEL_PUSH frame that refuses a promised push by its push ID. |
| Name | Description |
|---|---|
| ExtendedConnect | Performs an Extended CONNECT handshake (RFC 9220) and keeps the request stream open as a tunnel. |
| TunnelSend | Sends raw bytes as a DATA frame on an open tunnel. |
| TunnelPump | Pumps the QUIC event loop so tunnel data is read and delivered on OnTunnelData. |
| ServerSupportsWebTransport | Returns True when the server SETTINGS advertised WebTransport support. |
| WebTransportConnect | Establishes a WebTransport session over an Extended CONNECT request. |
| WebTransportProcessEvents | Pumps the QUIC connection once so peer-opened WebTransport streams are harvested. |
| Name | Description |
|---|---|
| QPACKDynamicInserts | Returns how many QPACK dynamic-table insertions the request encoder has performed. |
| BlockedThenResumedCount | Returns how many response header sections were blocked on QPACK inserts and later resumed. |
| Name | Description |
|---|---|
| BlockedThenResumedCount | Returns how many response header sections were blocked on QPACK inserts and later resumed. |
| CancelPush | Sends a CANCEL_PUSH frame that refuses a promised push by its push ID. |
| Connect | Opens the QUIC connection, or sends the HTTP/3 CONNECT verb from the URL overload. |
| ConnectAsync | Sends a non-blocking CONNECT; the reply arrives on OnResponse. |
| Connected | Returns True when the HTTP/3 connection is currently open. |
| Delete | Sends a synchronous HTTP/3 DELETE request to remove the target resource. |
| DeleteAsync | Sends a non-blocking DELETE; the reply arrives on OnResponse. |
| Disconnect | Closes the HTTP/3 connection and the underlying QUIC transport. |
| ExtendedConnect | Performs an Extended CONNECT handshake (RFC 9220) and keeps the request stream open as a tunnel. |
| Get | Sends a synchronous HTTP/3 GET request, returning the body as a string or writing it to a stream. |
| GetAsync | Sends a non-blocking GET; the reply arrives on OnResponse. |
| Head | Sends a synchronous HTTP/3 HEAD request and returns the response object with the status and headers. |
| OptionsAsync | Sends a non-blocking OPTIONS; the reply arrives on OnResponse. |
| Patch | Sends a synchronous HTTP/3 PATCH request carrying a partial-update payload. |
| PatchAsync | Sends a non-blocking PATCH; the reply arrives on OnResponse. |
| Post | Sends a synchronous HTTP/3 POST request with a request body. |
| PostAsync | Sends a non-blocking POST; the reply arrives on OnResponse. |
| Put | Sends a synchronous HTTP/3 PUT request with a request body. |
| PutAsync | Sends a non-blocking PUT; the reply arrives on OnResponse. |
| QPACKDynamicInserts | Returns how many QPACK dynamic-table insertions the request encoder has performed. |
| Query | Sends a synchronous HTTP/3 QUERY request, a safe and idempotent verb that carries a body. |
| QueryAsync | Sends a non-blocking QUERY; the reply arrives on OnResponse. |
| RequestOptions | Sends a synchronous HTTP/3 OPTIONS request to inspect the options of a resource. |
| ServerSupportsWebTransport | Returns True when the server SETTINGS advertised WebTransport support. |
| SetMaxPushId | Sends a MAX_PUSH_ID frame that raises the highest push ID the client accepts. |
| Trace | Sends a synchronous HTTP/3 TRACE request used as a loop-back test. |
| TraceAsync | Sends a non-blocking TRACE; the reply arrives on OnResponse. |
| TunnelPump | Pumps the QUIC event loop so tunnel data is read and delivered on OnTunnelData. |
| TunnelSend | Sends raw bytes as a DATA frame on an open Extended CONNECT tunnel. |
| WebTransportConnect | Establishes a WebTransport session over an Extended CONNECT request. |
| WebTransportProcessEvents | Pumps the QUIC connection once so peer-opened WebTransport streams are harvested. |