Skip to main content
Version: 0.6.x
input/httpINPUTBUFFERPROCESSOROUTPUT

HTTP

The HTTP input runs as an Axum HTTP server and accepts POST requests sent to address+path. The request body (JSON) is decoded and forwarded into the stream processing pipeline. Optional CORS and Basic/Bearer authentication are supported. Bind failures surface synchronously: if the listen address cannot be bound (for example, the port is already in use), connect fails with an explicit error instead of starting silently; if the listener stops at runtime, reads report a disconnection so the engine can re-bind. As a channel-based input it follows the engine's cancellation-safety contract: dropping a pending read never loses an already-decoded message (see Input Delivery Semantics).

Configuration​

FieldTypeRequiredDefaultDescription
typestringyes—Constant value "http"
addressstringyes—Listen address, e.g. 0.0.0.0:8080
pathstringyes—URL path that receives messages, e.g. /data
cors_enabledbooleannofalseWhether to enable CORS
authobjectno—Authentication configuration, see table below

auth​

auth is a tagged enum (distinguished by the type field) with two mutually exclusive forms:

FieldTypeRequiredDescription
typestringyes"basic" or "bearer"
usernamestringyes (basic)Basic auth username
passwordstringyes (basic)Basic auth password
tokenstringyes (bearer)Bearer token

Examples​

input:
type: "http"
address: "0.0.0.0:8080"
path: "/data"
cors_enabled: true
input:
type: "http"
address: "0.0.0.0:8080"
path: "/data"
auth:
type: "basic"
username: "user"
password: "pass"
input:
type: "http"
address: "0.0.0.0:8080"
path: "/data"
auth:
type: "bearer"
token: "your-token"