This SIMPL Windows module package provides a flexible and robust way to issue
HTTP and HTTPS requests directly from a SIMPL Windows program. All request
parameters are exposed as module parameters and override inputs, allowing
requests to be fully driven by program logic or dynamic configuration data
rather than hard-coded values.
Protocol Support
The package includes separate HTTP and HTTPS modules. The HTTPS module adds
control over SSL certificate verification, which may be enabled or disabled via
parameters or override inputs. This allows communication with trusted,
self-signed, or internal certificates as required.
Request Configuration
Parameters and override inputs are provided for IP address or hostname, port,
request path, request method, content string (request body), username,
password, and additional headers. When override inputs are updated after
program start (such as when loading a system configuration), the overridden
values are used for subsequent requests.
Requests are dynamically constructed using the configured values. When the
[request_path$] input changes, the module builds the full request
and sends it to the target endpoint.
Supported HTTP methods include GET, POST, PUT, DELETE, PATCH, and HEAD.
Authentication
Basic and Digest authentication are supported. Basic authentication may be
enabled or disabled dynamically via module parameters or override inputs.
Digest authentication is handled automatically when required by the server;
if a Digest challenge is received, the module responds using the configured
credentials.
For Basic authentication, when enabled, the module sends an
Authorization: Basic header using the configured or overridden username
and password, encoded using Base64.
For Digest authentication, if the
server responds with a Digest challenge, the module automatically retries the
request using the credentials provided and the parameters supplied by the
server. Digest authentication currently supports the MD5 algorithm only.
Digest parameters are cached for reuse to reduce authentication round-trips.
The cache expires after five minutes or when the target IP address, hostname,
or port changes, or if the server provides a new challenge.
Request Queue
The module implements a FIFO request queue to ensure requests are processed
sequentially. Each request must complete, either successfully or with an error,
before the next queued request is sent.
Response & Error Handling
The response body returned by the server is output on the
[response$] serial signal, and the associated HTTP response code
is output on the [response_code] analog signal.
If a request fails due to a connection error, authentication failure, protocol
error, or internal error, an entry is written to the processor’s error log to assist
with troubleshooting.
Debug Output
When the [enable_debug] input is latched high, the module outputs
detailed diagnostic information to the console, including request construction,
headers, authentication state, and server responses. Latching this input low
disables all debug output for normal operation.
Licensing
This module falls under our “all you can eat” license. After purchasing the
license, your company may use this module in any program your company
creates, as many times as desired. There are no additional licensing fees beyond
the initial purchase.