Skip to content

01·Mock API

Make your API fail on purpose.

Upload any JSON and get a URL. Then make it slow, flaky or wrong with a single query parameter. Test every spinner, retry and error screen before production tests them for you.

Self-hosted · zero dependencies · 202 tests

UploadTerminal
$ curl -X POST http://localhost:8001/upload -d '{"user":42}'
StoredResponse

Mock created

http://localhost:8001/mock/gqqQumr3tmdItHEfSW7Z6w

Break it
  1. GET /mock/gqqQumr3…?sequence=500,503,ok50012 ms
  2. GET /mock/gqqQumr3…?sequence=500,503,ok5039 ms
  3. GET /mock/gqqQumr3…?sequence=500,503,ok20011 ms
  4. Your retry logic recovered on attempt 3. X-Mock-Sequence: 3/3

No SDK, just HTTP

Point any client at a URL: curl, fetch, a mobile app, a browser. No sign-up, no library, no code changes.

Every failure mode

Delays, forced errors, random failures and scripted retry sequences, all from the query string.

Safe to share

Rate-limited writes, uploads that expire, capped storage and unguessable URLs. Put it online for your whole team.

02·Try it now

Create a mock in one click.

This server is live. Paste any JSON, create a mock, and point your app at its URL. No account needed; mocks expire after 24 hours.

Or use curl
$ curl -X POST http://localhost:8001/upload -H 'Content-Type: application/json' -d '{"hello":"world"}'
$ curl 'http://localhost:8001/mock/<id>?delay=2000'
One query string

Your data stays the same. Its behaviour doesn't.

Upload a response once. Every request can then choose how that response behaves: how long it takes, whether it fails, and in what order.

Your client just retries the same URL. The server keeps count, so there's nothing to reset between test runs.

Your app
Request fetch(url) Any client, any language
Mock API
Query controls ?delay ?status ?flaky ?sequence Applied before your stored JSON is sent
What comes back
Responses
200503429304
Exactly the case you want to test
Works on every route Nothing to install in your app Stored JSON is never changed

03·Query controls

Every failure mode, one query string away

?delay=3000200

Slow responses

See your loading states, skeletons and timeouts for real. Capped at 10 s so nobody ties up the server.

?status=401401

Forced errors

Return any standard 4xx or 5xx with a proper error body. Build the "session expired" screen before the auth team ships.

?flaky=0.3500

Random failures

Fail 30% of calls at random. Add status=503 to choose the error your circuit breaker sees.

?sequence=500,503,ok3/3

Scripted retries

Fail, fail, then succeed, one step per call. The step is in X-Mock-Sequence.

?header_Retry-After=30hdr

Any response header

Add Retry-After, Cache-Control or your own X-* headers. Unsafe ones are refused.

?cors=offCORS

Blocked in the browser

CORS is on by default. Turn it off for one request to see how your app handles a blocked call.

04·URL builder

Build a request

Start from a scenario or set each control yourself. The URL and curl command update as you go. This page only builds them; nothing is sent.

Start from
Endpoint
Timing
Failures
Response headers
Request URL
http://localhost:8001/mock/gqqQumr3tmdItHEfSW7Z6w
curl
curl -i 'http://localhost:8001/mock/gqqQumr3tmdItHEfSW7Z6w'

Expected responses

    05·Endpoints

    Endpoints that answer the awkward questions

    Real-world details

    Behaves like a real API, down to the headers.

    • ETag and 304. Revalidate with If-None-Match. Guard updates with If-Match and get a real 412 on conflicts.
    • Browser-ready CORS. Preflights are answered and ETag, X-Request-Id and rate-limit headers are readable from JavaScript.
    • Consistent errors. Every error has the same { success, error, meta } shape with a request ID you can find in logs.
    • Exact data. 12345678901234567890 and 2.50 come back exactly as sent, not rounded by a JSON round trip.
    • Nothing cached by accident. Every response is no-store unless you opt in.
    0
    Runtime npm packages
    202
    Tests on a real server
    10
    Query controls per route
    ~4 s
    Full test run

    06·Safe to put online

    Share it with your team without it becoming a free file host

    Rate-limited writes

    30 uploads per minute per IP, with Retry-After and RateLimit-* headers.

    Self-cleaning

    Uploads expire after 24 h. Storage is capped at 10,000 uploads and 500 MB.

    Unguessable URLs

    128-bit IDs, delete tokens stored only as hashes, and IDs checked before any file is touched.

    Slow-client proof

    Header and body timeouts, a cap on concurrent delays, and graceful shutdown on deploy.

    Stop waiting for the backend.

    Build the happy path, the slow path and the broken path today.