Output: http-server
Run HTTP server
Example
Pipe Language Snippet:
http-server:
address: http://httpbin.org/get
Field Summary
Field Name | Type | Description | Default |
---|---|---|---|
address | string | Bind address | - |
path | string | Url path on which to accept queries | / |
content-type | string | Content type to return with response | - |
cert | path | Path to the TLS certificate to be used (TLS requires both cert and key to be valid) | - |
key | path | Path to the TLS private to be used (TLS requires both cert and key to be valid) | - |
body | templated text | Allows specifying exactly what is returned | - |
Fields
address
Type: string
Bind address
Example
Pipe Language Snippet:
http-server:
address: 127.0.0.1:8000
path
Type: string
Default: /
Url path on which to accept queries
Example
Pipe Language Snippet:
http-server:
address: 127.0.0.1:8000
path: /foo/bar
content-type
Type: string
Content type to return with response
Example
Pipe Language Snippet:
http-server:
address: 127.0.0.1:8000
content-type: application/text
body: some text
cert
Type: path
Path to the TLS certificate to be used (TLS requires both cert
and key
to be valid)
Example
Pipe Language Snippet:
http-server:
address: 0.0.0.0:8000
cert: /etc/letsencrypt/live/your.domain.io/fullchain.pem
key: /etc/letsencrypt/live/your.domain.io/privkey.pem
key
Type: path
Path to the TLS private to be used (TLS requires both cert
and key
to be valid)
body
Type: templated text
Allows specifying exactly what is returned
When not specified, the body returned is the whole event. May contain event field expansions.
Example
Pipe Language Snippet:
http-server:
body: '${_raw}'
address: 127.0.0.1:8000