getActiveHttpServerUrl()

Returns the URL of the server to which an HTTP request shall be sent.

Synopsis

string getActiveHttpServerUrl( )

Return value

URL which shall be used to send an HTTP request to. If the UI does not use HTTP an empty string will be returned.

Description

The function getActiveHttpServerUrl() returns the URL of the server to which an HTTP request shall be sent.

The return value inside a redundant system is the URL of the active HTTP Server or the URL of a distributed HTTP Server, depending on how the usage of the HTTP Server is configured. The URL that is used for file requests of the UI is returned.

Example

Following example queries the active HTTP server URL and checks if the UI uses HTTP.

main()
{
  string url = getActiveHttpServerUrl();
  if(url == "")
  {
    DebugN("No HTTP usage");
  }
  else
  {
    //...
  }
}

Assignment

HTTP functions

Availability

UI