Skip to content

HTTP Server

HTTP Server (http-server)

Run an HTTP server and output any received requests.

Http binary json raw

Minimal example

input:
http-server:
address: ~
JSON
{
"input": {
"http-server": {
"address": null
}
}
}

Contents

Behavior

Behavior
FieldTypeRequiredDescription
only-bodyboolean (bool)Only print out body, assumed to be JSON.
Default: false
querystringOnly print out given query var.
jsonboolean (bool)Data is assumed to be already JSON.
Default: false
ignore-linebreaksboolean (bool)Do not split body on line breaks.
Default: false

Reliability

Reliability
FieldTypeRequiredDescription
timeoutstringTimeout.

Response

Response
FieldTypeRequiredDescription
custom-responsemultiline-text (string)Respond using this text.
source-ip-fieldfield (string)If specified the source IP address for the HTTP request to the server will be stored in the specified field.
Examples: data_field

Security

Security
FieldTypeRequiredDescription
tlsTlsOptional TLS certificate and key.

Server

Server
FieldTypeRequiredDescription
addressstringServer listens on this address:port.
pathstringOptionally restrict to this path.
content-typestringOptional content type for responses.

Schema

Tls Fields

FieldTypeRequiredDescription
certpath (string)Path to the certificate file.
Examples: /path/to/file, c:\users\joe\data\file.txt
keypath (string)Path to the private key file.
Examples: /path/to/file, c:\users\joe\data\file.txt