More sandboxes

On this page

HTTP request bins

Capture outgoing HTTP calls, webhooks and callbacks at a URL you control. Each request bin records the method, path, headers and body, then returns a configured response.

Create a bin

Open Request bins and create a bin. Copy its capture URL and configure your application's test environment to send requests there. Treat the URL's token as a secret: anyone with that URL can submit captures.

The capture URL accepts HTTP requests without your workspace session. Reading captures and changing the bin still require team authentication.

Send a request

bash
curl -X POST "$BIN_CAPTURE_URL/order.created" \
  -H 'Content-Type: application/json' \
  -d '{"order_id":"10482","status":"confirmed"}'

Inspect the capture in the workspace. You can read its headers, query parameters, JSON body, raw bytes and signature-check result.

Wait in a test

Use the bin's workspace ID and a team API key:

bash
curl -f -H "Authorization: Bearer $TESTLIE_API_KEY" \
  "https://testlie.com/api/bins/$BIN_ID/requests/wait?method=POST&timeout=30"

A match returns HTTP 200; a timeout returns HTTP 408. Use a fresh bin per parallel test run, or filter by the expected path and test start time, to avoid reading another run's request.

Simulate responses

Set the response status, headers, body and delay. Add rules for particular methods and paths to exercise retries, slow integrations and error handling. The configured response applies only to this test endpoint.

Bin responses are served from the Testlie domain, so they are sandboxed and limited to ordinary API headers: Content-Type (JSON, XML, plain text or CSV; text/html is served as plain text), caching and validator headers, Retry-After, CORS Access-Control-Allow-* headers, Content-Disposition (inline, or a download of a .json, .txt, .csv, .tsv, .xml, .log or .ndjson file), and any X-* or RateLimit-* header. Headers that act on the browser, such as Set-Cookie, Location, Refresh, WWW-Authenticate, Link or reporting headers, cannot be set.

Admins can replay a capture to another HTTP endpoint. Replay sends a real outbound request, so choose the target deliberately. Private and internal replay targets are blocked by default, hop-by-hop and proxy headers are not replayed, and the request carries Via: 1.1 testlie-replay. On the hosted service each replay counts as a captured request, and replays are capped per day (20 on the Free plan).

Plans and limits cover request quotas and retention. API reference explains team API key authentication.