Request Reliability
Source file: examples/request_reliability.hen
What It Demonstrates
- preamble reliability defaults
- request-level overrides
- dependency-driven follow-up requests
poll_untilwith a fixed retry interval
Key Pattern
timeout = 30s
poll_every = 1s
---
Create export
POST {{ API_ORIGIN }}/echo
~~~json
{
"jobId": "export-orders-csv",
"format": "csv",
"resource": "orders"
}
~~~
^ & status == 200
& body.jobId -> $JOB_ID
---
Wait for export
> requires: Create export
POST {{ API_ORIGIN }}/echo
timeout = 5s
poll_until = 2m
poll_every = 2s
Run It
hen verify ./examples/request_reliability.hen
hen run ./examples/request_reliability.hen all --non-interactive
What To Notice
- The second request inherits the preamble defaults, then overrides only the values it needs.
- Polling retries after assertion failures or per-attempt timeouts.
- The captured
JOB_IDkeeps the second request tied to the first request’s output. - The live example uses an echo-backed mock job so the flow stays runnable in CI and local docs.
Related reference: Reliability