save_http
Sends a byte stream via HTTP.
save_http url:string, [params=record, headers=record, method=string, parallel=int, tls=bool, cacert=string, certifle=string, keyfile=string, skip_peer_verification=bool]
Description
Section titled “Description”The save_http
operator performs a HTTP request with the request body being the
bytes provided by the previous operator.
url: string
Section titled “url: string”The URL to write to. The http://
scheme can be omitted.
method = string (optional)
Section titled “method = string (optional)”The HTTP method, such as POST
or GET
.
The default is "POST"
.
params = record (optional)
Section titled “params = record (optional)”The query parameters for the request.
headers = record (optional)
Section titled “headers = record (optional)”The headers for the request.
tls = bool (optional)
Section titled “tls = bool (optional)”Enables TLS.
Defaults totrue
.
cacert = string (optional)
Section titled “cacert = string (optional)”Path to the CA certificate used to verify the server’s certificate.
Defaults to the Tenzir configuration value tenzir.cacert
, which in turn
defaults to a common cacert location for the system.
certfile = string (optional)
Section titled “certfile = string (optional)”Path to the client certificate.
keyfile = string (optional)
Section titled “keyfile = string (optional)”Path to the key for the client certificate.
skip_peer_verification = bool (optional)
Section titled “skip_peer_verification = bool (optional)”Toggles TLS certificate verification.
Defaults to false
.
Examples
Section titled “Examples”Call a webhook with pipeline data
Section titled “Call a webhook with pipeline data”save_http "example.org/api", headers={"X-API-Token": "0000-0000-0000"}