TsgcHTTP3Client › Methods › Trace

Trace Method

Sends a synchronous HTTP/3 TRACE request used as an application-layer loop-back test.

Syntax

Trace(const aURL: string): string string overload

function Trace(const aURL: string): string; overload;
NameTypeDescription
aURLconst stringAbsolute URL of the target resource.

Response body received from the server, decoded as a string. (string)

Trace(const aURL: string; const aResponseContent: TStream) stream overload

procedure Trace(const aURL: string;

  const aResponseContent: TStream); overload;
NameTypeDescription
aURLconst stringAbsolute URL of the target resource.
aResponseContentTStreamStream that receives the response body.

None. The response body is written to aResponseContent.

Remarks

The call blocks the calling thread until the complete response has been received. When the client is not connected yet, the URL is used to open the QUIC connection first. For a non-blocking request use TraceAsync, which delivers the reply on OnResponse.

TRACE asks the server to echo the received request back to the client, which makes it useful to see what proxies on the path added or rewrote. Many servers disable TRACE for security reasons and answer 405 Method Not Allowed.

Example



vResponse := oClient.Trace('https://www.example.com/');

Back to Methods