Skip to content

load_http

Loads a byte stream via HTTP.

load_http url:string, [data=record, params=record, headers=record,
method=string, form=bool, chunked=bool, multipart=bool,
parallel=int, tls=bool, cacert=string, certifle=string,
keyfile=string, skip_peer_verification=bool]

The load_http operator performs a HTTP request and returns the response.

The URL to request from. The http:// scheme can be omitted.

The HTTP method, such as POST or GET.

The default is "GET".

The query parameters for the request.

The headers for the request.

The request body as a record of key-value pairs. The body is encoded as JSON unless form=true has been set.

Submits the HTTP request body as form-encoded data.

This automatically sets the Content-Type header to application/x-www-form-urlencoded.

Defaults to false.

Whether to enable chunked transfer encoding. This is equivalent to manually setting the header Transfer-Encoding: chunked.

Defaults to false.

Whether to encode the HTTP request body as multipart message.

This automatically sets the Content-Type header to application/form-multipart; X where X contains the MIME part boundary.

Defaults to false.

Enables TLS.

Defaults to true.

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.

Path to the client certificate.

Path to the key for the client certificate.

Toggles TLS certificate verification.

Defaults to false.

load_http "example.org/api", headers={"X-API-Token": "0000-0000-0000"}

save_http