read-http

Start an HTTP server on host:port and emit each request as an event. The request body is always passed through as a raw string; use a downstream parse-json stage if you need structured data.

Config

Optional:

  • port: Port to listen on (default: 8080)
  • host: Host to bind to (default: 0.0.0.0)

Output event

Each HTTP request produces an event with these fields:

Field Type Description
method string HTTP method (GET, POST, …)
path string Request path (e.g. /ingest)
headers object Request headers as key/value pairs
query object Parsed query-string parameters
body string Raw request body
status number Response status code (always 200)

Example

pipeline:
  read-http:
    module: read-http
    config:
      port: 3000
      host: 127.0.0.1
  format-json:
    module: format-json
    inputs: [read-http]
  write-stdout:
    module: stdout
    inputs: [format-json]