POST JSON payload
12-http-post-json.yaml
HTTP(S)
What this example does
This example demonstrates post json payload.
Checks and behavior
- Sends an POST request to http://127.0.0.1:8080/api/check.
- Checks allowed/denied HTTP status codes.
- Validates required, forbidden or matching HTTP headers.
- Looks for expected response content and/or rejects known error markers.
Adapt example domains, addresses, credentials and thresholds to your environment before use.
YAML configuration
# Copyright (c) 2026 mati peterson. Maintainer: mati peterson <ipsonic@mailbox.org>. Project: https://ipsonic.com/probe/. Disclaimer: Provided AS IS, without warranty of any kind. Use at your own risk; validate checks and configurations before production use.
name: POST JSON payload
url: http://127.0.0.1:8080/api/check
request:
method: POST
headers:
Accept: application/json
json:
action: ping
count: 1
timeouts:
connect: 3
response: 5
tests:
status:
allow: [200, 201]
headers:
contains:
Content-Type: [application/json]
body:
not_contains: [error]