Test retry and back-off logic
A mock that fails first, then succeeds — so you can prove your retry code works.
When to use this
Retry code is notoriously untested because real APIs rarely fail on demand. This mock returns 500 on the first call and 200 on the second, then cycles, so an automated test can assert your client retries and recovers. The X-Mockapi-Variant header shows which step served each hit.
Create the mock
curl -X POST https://quickmock.dev/api/mocks \
-H 'Content-Type: application/json' \
-d '{
"method": "GET",
"response_status": 500,
"content_type": "application/json",
"response_body": "{\"error\":\"upstream\"}",
"response_sequence": [
{ "status": 200, "body": "{\"ok\":true}" }
]
}'
Call it
curl https://quickmock.dev/m/<slug>
What you get
1st call -> 500 (X-Mockapi-Variant: seq-1/2)
2nd call -> 200 (seq-2/2)
...then it cycles