Test Endpoint Options

The /test endpoint is a flexible target for exercising clients under different latency and payload scenarios. You can call it with any HTTP method; query parameters control timing and response length.

Parameter Type / Range Description Examples
random_delay_ms integer, 1–600 000 Introduces a server-side wait before responding. Useful for simulating slow backends. /test?random_delay_ms=500
/test?random_delay_ms=10000
response_size_bytes integer, 0–1 048 576 Sets the exact byte length of the response body. The response is the string "OK" repeated and trimmed to match the requested size. /test?response_size_bytes=0
/test?response_size_bytes=1024

Parameters are optional and can be combined, e.g. /test?random_delay_ms=250&response_size_bytes=4096. When no parameters are supplied, the endpoint replies immediately with OK.

Usage Patterns

Because /test accepts all HTTP verbs via router.all, you can also exercise non-GET behaviours (POST, PUT, etc.). Request bodies are ignored, letting you focus on client-side behaviour while the server responds deterministically.

Example: curl

curl -k "https://your-host/test?random_delay_ms=750&response_size_bytes=128"

Example: hey / bombardier

hey -z 30s -q 50 -disable-compression \
  "https://your-host/test?random_delay_ms=100&response_size_bytes=2048"