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

Fields

FieldTypeRequiredDescription
address ServerstringServer listens on this address:port.
path ServerstringOptionally restrict to this path.
content-type ServerstringOptional content type for responses.
tls SecurityTlsOptional TLS certificate and key.
only-body Behaviorboolean (bool)Only print out body, assumed to be JSON.
query BehaviorstringOnly print out given query var.
json Behaviorboolean (bool)Data is assumed to be already JSON.
ignore-linebreaks Behaviorboolean (bool)Do not split body on line breaks.
custom-response Responsemultiline-text (string)Respond using this text.
source-ip-field Responsefield (string)If specified the source IP address for the HTTP request to the server will be stored in the specified field.
Examples: data_field
timeout ReliabilitystringTimeout.

Server

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

Security

Show fields
FieldTypeRequiredDescription
tlsTlsOptional TLS certificate and key.

Behavior

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

Response

Show fields
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

Reliability

Show fields
FieldTypeRequiredDescription
timeoutstringTimeout.

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