getConfigActiveHttpServerUrl()

Returns the URL which addresses the project's active HTTP Server.

Synopsis

string getConfigActiveHttpServerUrl();

Return value

URL which addresses the project's active HTTP Server.

Description

Returns the URL which addresses the project's active HTTP Server. Note that this function does not know if the project is using an HTTP Server at all, but it returns a sensible default address if the project would use an HTTP server.

That is:

if there is an "httpServer" config entry in the [ui] section, this one is used as a base, and is modified according to:

  • if this is a redundant system and the given httpServer is one of the redu servers, the host name part of the URL is changed to point to the active redu server.

  • if no port is given, the port is set to 80 on Windows and 8080 on Linux.

  • if there is no "httpServer" config entry, the returned URL uses the http:// scheme. The host part is set to the event manager host in a non redundant system, or to the active event manager host in a redundant system. The port is set to 80 on Windows and 8080 on Linux.

Example

Following example returns the URL which addresses the project's active HTTP Server.

main(mapping event)


{


   string actUrl;


   actUrl = getConfigActiveHttpServerUrl();


   DebugN(actUrl);


}

Assignment

HTTP functions

Availability

UI