Executes high-performance, non-blocking HTTP and HTTPS requests against external REST APIs and web services. Features an asynchronous decoupled queue architecture that prevents blocking visual rule gates during network round-trips, supports parallel request execution workers, allows custom correlation Payload strings on sink nodes, and generates "Request Done" system events with detailed response metrics and echoed payloads.
2. Technical Architecture
The HTTP Client plugin executes RESTful web service requests over HTTP and HTTPS connections. It manages pooled sockets, handles Bearer Token, Basic Authentication, and custom API Key header injection, supports SSL/TLS certificate bypass options for internal endpoints, and automatically converts responses into strongly typed catalog values.
Decoupled Request & Answer Architecture
In industrial automation workflows, rule execution gates must evaluate at sub-millisecond speeds. Synchronous HTTP network calls over WAN, cellular, or cloud connections can introduce latency ranging from 50 milliseconds to tens of seconds, causing rule gates to stall. Version 1.4.0 decouples HTTP request dispatching from response handling across two critical dimensions:
1. Non-Blocking Point Polling (Inputs):
Polling endpoints are continuously monitored in a dedicated background task (RunPollLoopAsync).
When a rule node reads a polled point as an input (OnReadAsync), the adapter returns the latest cached payload and status code immediately from memory, avoiding inline network latency.
2. Non-Blocking Point Writes & Commands (Outputs / Sinks):
Writing to an HTTP point (e.g., POST, PUT, DELETE, PATCH) or invoking cmd:{point.Id} / http:request does not await the remote HTTP response.
The outbound request is enqueued into a bounded channel queue (Channel<HttpOutboundRequestItem>) with configurable capacity (default: 1,000 items).
The sink call completes immediately (< 1 ms), releasing the visual rule gate without delay.
3. Parallel Execution Workers:
A pool of concurrent worker tasks (default: 10 parallel workers, configurable via ParallelWorkers) continuously consumes requests from the bounded channel.
Requests are executed concurrently using HttpClientFactory and pooled sockets, maximizing throughput.
4. Sink Node Correlation Payload:
Outbound sink points accept an optional Payload string argument. If the rule passes a JSON object (e.g., {"Body": "{\"val\": 42}", "Payload": "BATCH-9021"}), the adapter separates the request body from the correlation payload.
The payload travels through the worker queue alongside the request and is preserved even in the event of timeouts or HTTP network errors.
5. Asynchronous System Event: "Request Done" (http.request_done):
Upon completion of the HTTP transaction (both 2xx successes and 4xx/5xx/network errors), the plugin dispatches an event snapshot to the Uniflow Rule Engine.
Event listeners receive the complete request metadata, response status code, response body, execution duration, error message, and the echoed correlation Payload.
System Interaction & Exposed Catalog Routes
Catalog Routes & Node Integration
Input Event Triggers (Event Input Nodes):
Request Done (http.request_done): Emitted whenever an asynchronous outbound HTTP request finishes. Contains request details, HTTP status code, response body, duration, and the echoed correlation Payload.
http.response_received: Emitted upon successful HTTP response arrival.
http.request_failed: Emitted when an HTTP request times out or returns an error.
http.status_code_changed: Monitored HTTP status code update.
Header key for API key or custom header authentication (e.g. X-API-Key).
API Key ValueApiKeyValue
↳
String
""
Key value associated with HeaderName.
Custom Headers (JSON)CustomHeadersJson
↳
String
""
JSON dictionary of static HTTP headers applied to all requests.
4. Exposed Routes & Data Types
Input Source (Polled Points)
The Input Source node reads response payloads and HTTP status codes from configured pollable HTTP endpoints. Reads are served instantaneously from local memory.
Human-Readable Field Name
Item ID
Data Type
Description
Configured HTTP Endpoint{PointId}
↳
String / Json / Double / Int32 / Bool
Polled response payload value from remote REST endpoint.
Endpoint Status Code{PointId}_status
↳
Int32
HTTP status code integer (e.g., 200 OK, 404 Not Found, 500 Error).
Last Response Payloadhttp:last_response
↳
String
Payload body of the most recently finished request.
Last Response Codehttp:last_response_code
↳
Int32
HTTP status code of the most recently finished request.
Event Input: "Request Done" (http.request_done)
Emitted whenever an asynchronous outbound HTTP request finishes execution. Triggers reactive rule execution with the following fields:
Field Name
Data Type
Description
PointIdString
↳
Identifier of the point or command that originated the request.
PointNameString
↳
Human-readable name of the target point or action.
MethodString
↳
HTTP method executed (GET, POST, PUT, DELETE, PATCH).
UrlString
↳
Full destination URL of the HTTP call.
StatusCodeInt32
↳
HTTP status code returned by the server (200, 201, 400, 500, or 0 on network failure).
SuccessBool
↳
true if the HTTP status is 2xx and no network exception occurred; otherwise false.
ErrorString
↳
Error message, DNS failure, or HTTP exception details if the call failed.
ResponseString
↳
Full response body returned by the HTTP server.
PayloadString
↳
The correlation payload string passed to the sink node when the request was initiated.
DurationMsInt64
↳
Total elapsed execution time in milliseconds for the HTTP request.
TimestampDateTime
↳
UTC timestamp when the request finished.
Output Target (Action / Sink Nodes)
The Output Target node writes data to HTTP points or sends parameterized HTTP requests. All write actions return immediately (< 1 ms).
Target Name
Target ID
Parameter
Type
Required
Description
Writable Point{PointId}
↳
Body
String
False
Request body payload (JSON, text, XML) or query string.
↳
Payload
String
False
Correlation payload echoed back in the "Request Done" event.
HTTP Request Actionhttp:request
↳
Method
String
True
HTTP Method (POST, PUT, DELETE, GET).
↳
Url
String
False
Optional URL path override relative to BaseUrl.
↳
Body
String
False
HTTP request body content.
↳
Payload
String
False
Correlation payload echoed back in the "Request Done" event.
TIP
Sink parameters can be supplied as individual properties or combined in a JSON string, e.g.:
Scenario A: Weather REST API Telemetry Poller Updates Modbus Register
Workflow Overview:
The HTTP Client periodically polls an external weather REST endpoint (https://api.weather.local/v1/solar-radiation). The rule reads the cached value without waiting for network I/O, evaluates solar radiation thresholds, and updates a local Modbus holding register.
Scenario B: Avigilon Motion Detection Non-Blocking Incident POST
Workflow Overview:
When an Avigilon camera detects motion, Uniflow immediately formats an incident payload and issues an asynchronous HTTP POST request (http:request). Because the write call is non-blocking, the motion event gate is released in microseconds.
A barcode scanner triggers a production batch submission via an HTTP PUT call to a Cloud ERP API. A correlation tag (BATCH-2026-X) is passed in the Payload sink parameter. When the cloud server responds, the "Request Done" event is received by a second rule, inspecting StatusCode and persisting the response along with the echoed Payload into Internal Storage.
Logic Flow Diagram:
VISUAL ARCHITECTURE FLOW DIAGRAM
Rendering Flow Architecture Diagram...
Rule 1 (Outbound Submission):
Input: Barcode Scanner Event (BatchId).
Sink Node:HTTP Client -> Point ERP_Batch_Submit (PUT).