This feature is another way of providing you the ability to create your own server administration dialog. Following the ability to retrieve information for all processes (added in 4D v16 R4), we are now offering you a new command which returns, as a whole, all runtime information about 4D Web server.
With 4D v16 R5, retrieving web server information has never been easier, thanks to a single command: WEB Get server info.
The WEB Get server info command has an optional input parameter:
result:= WEB Get server info ( { withCacheInfo } )
This parameter allows you to define whether you want to get information about the web server cache in the cache attribute, otherwise this attribute will be undefined.
Note: the cache information is very detailed, so it could be quite large. This is why the default setting for withCacheInfo parameter is ‘false’.
Code Example
If I execute the following code on a 4D client in a method with the Execute on server property set:
C_OBJECT($obj)
$obj:=WEB Get server info
The $obj object returned by the command will contain the information as shown below. In this example, the web server has been running for 40 seconds on port 80, the SOAP server is started, TLS is enabled and its minimum version is 1.2,…
{ "started": true, "uptime": 40, "SOAPServerStarted": true, "startMode": "manual", "httpRequestCount": 0, "options": { "webCharacterSet": "UTF-8", "webHTTPCompressionLevel": 1, "webHTTPCompressionThreshold": 1024, "webHTTPSPortID": 443, "webIPAddressToListen": ["192.168.xxx.xxx"], "webInactiveProcessTimeout": 28800, "webInactiveSessionTimeout": 28800, "webMaxConcurrentProcesses": 100, "webPortID": 80 }, "security": { "TLSEnabled": true, "cipherSuite": "ECDHE-RSA-AES128-GCM-SHA256:...:CAMELLIA128-SHA", "openSSLVersion": "OpenSSL 1.0.2h 3 May 2016", "minTLSVersion": "1.2" } }