Skip to main content
Version: 3.5.3

Output: http-post

Run HTTP POST requests

Example

Pipe Language Snippet:

http-post:
url: http://httpbin.org/post

Field Summary

Field NameTypeDescriptionDefault
batchinteger or the 'document'Maximum number of events in an output batch. If 'document' send on end of document-
timeoutintervalInterval after which the batch is sent, to keep throughput going100ms
headertemplated textPut a header line before the batch-
footertemplated textPut a header line after the last line of the batch-
use-document-markerboolEnrich the pipe metadata with a document marker (for document handling in batch mode)false
urlurlConnect to this address-
body-fieldfieldA field containing the body-
headersarray of mapsHeaders to send with the query-
retryRetryFor operations that could potentially fail-
insecureboolIgnore TLS certificate validation errors (This is unsafe to use)false

Fields

batch

Type: integer or the 'document'

Maximum number of events in an output batch. If 'document' send on end of document

timeout

Type: interval

Default: 100ms

Interval after which the batch is sent, to keep throughput going

Type: templated text

Put a header line before the batch

Type: templated text

Put a header line after the last line of the batch

use-document-marker

Type: bool

Default: false

Enrich the pipe metadata with a document marker (for document handling in batch mode)

url

Type: url

Connect to this address

If the url changes, then header and/or footer can be invoked

body-field

Type: field
Alias: body

A field containing the body

Example

Pipe Language Snippet:

http-post:
url: http://httpbin.org/post
body-field: some-field

headers

Type: array of maps

Headers to send with the query

Example

Pipe Language Snippet:

http-post:
url: http://httpbin.org/post
headers:
- custom-header: some data

retry

Type: Retry

For operations that could potentially fail

Field NameTypeDescriptionDefault
countintegerHow many attempts to make before declaring failure-
pausedurationHow long to pause before re-trying-
foreverboolKeep trying until success is declaredfalse

  count

Type: integer

How many attempts to make before declaring failure

Example

Pipe Language Snippet:

exec:
command: echo 'one two'
retry:
count: 1

Output:

{"_raw":"one two"}

  pause

Type: duration

How long to pause before re-trying

Accepts human-friendly formats, like 1m (for 1 minute) and 4h (for 4 hours)

Example

Pipe Language Snippet:

exec:
command: echo 'one two'
retry:
count: 6
pause: 10s

Output:

{"_raw":"one two"}

  forever

Type: bool

Default: false

Keep trying until success is declared

Accepts human-friendly formats, like 1m (for 1 minute) and 4h (for 4 hours)

Example

Pipe Language Snippet:

exec:
command: echo 'one two'
retry:
forever: true

Output:

{"_raw":"one two"}

insecure

Type: bool

Default: false

Ignore TLS certificate validation errors (This is unsafe to use)