WebGetUserAgent Function

Action

Gets the current value of the HTTP/HTTPS user agent.

Include file

WebAPI.bdh

Syntax

WebGetUserAgent( out sUserAgent : string,
                 in  nMaxLen    : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
sUserAgent A string buffer that will receive the current name of user agent.
nMaxLen The maximum length of the receive buffer sUserAgent (optional).

Example

dcltrans
  transaction TWebInit
  var
    sUserAgent: string;
  begin
    WebGetUserAgent(sUserAgent);
    write("HttpUserAgent: "); write(sUserAgent); writeln;
  end TWebInit;