TsgcHTTP3Client › Properties › UserAgent

UserAgent Property

Value sent in the user-agent header of every HTTP/3 request.

Syntax

property UserAgent: string read FUserAgent write FUserAgent;

Type

string

Default

The sgcWebSockets user-agent string, in the form Mozilla/5.0 (sgcWebSockets <version>).

Remarks

The value is sent as the user-agent header of every request the client issues, including the Extended CONNECT and WebTransport handshakes. Set it to identify your application to the server.

Assigning an empty string suppresses the header. To add or rewrite any other header, handle OnHTTP3BeforeRequest.

Example



oClient.UserAgent := 'MyApp/1.0';

Back to Properties