Tcl interface
The HTTP Client driver is similar to a UPoC driver. This uses the Network Configurator protocol dialog box to configure and pass values to the Query TPS. All actual HTTP interactions are made through Tcl function calls provided by the system.
The purpose of the NetConfig settings is to provide the defaults for access
by the TPS. Usually, when calling a TPS, a list of values is passed in, which are
referenced by the Tcl code. Usually, this list consists of four values, but HTTP Client
adds a fifth value, CFGS
, in its Query TPS:
CONTEXT
ARGS
MODE
VERSION
CFGS
For example:
httpQuery
{CONTEXT httpc_query}
{ARGS { }}
{MODE start}
{VERSION 3.0}
{CFGS {
{URL cmhspanther/movies/backup/dir1/}
{METHOD GET}
{HEADERS {
{Connection "Keep Alive"}
{User-Agent "Cloverleaf Integration Services 6.2}
{Accept "image gif"}
} }
{AUTH {
{CREDENTIALS d2VibWFzdGVyOnpycW1hNHY=}
} }
{HTTPS {
{MODE ClientAuth}
{CA_FILE D:/certs/ca/CaCert.pem}
{CA_PATH D:/certs/ca/newcerts}
{CERT_FILE D:/certs/client/ClCert.pem}
{PRIVATE_KEY D:/certs/client/ClPrivKey.pem}
} }
} }
When you use CFGS
values, NetConfig values are referenced
from within the TPS. You can use the values in CFGS
as arguments to the
HTTP Tcl function calls.
As an added convenience, the CFGS
list is provided in a
format readily usable by the HTTP Tcl functions. They can be passed as arguments to these
functions as-is.