API Playgrounds
Try REST calls, headers, retries and failures without writing a client or running a server. Runs in your browser, or as a mock API on your machine with one command.
npx tinypdf-mock.The simulators run inside your browser, so other programs cannot call them. To give your own app or service a mock API to call, run the local server from the REST API Playground.
About these playgrounds
Each playground starts with a small mock API that lives inside your browser tab, so you can send a request straight away. You can make the mock server fail in specific ways, such as an overloaded 503, a 429 with a Retry-After header, a slow response or a dropped connection, and see how different headers and retry settings change the outcome.
Use them to learn how HTTP APIs behave under failure, test a retry policy before putting it in code, or see what a browser can and cannot send. They are not hosted APIs: nothing on the internet can connect to them, and settings are cleared when you reload unless you copy a link. When your own code needs something to call, the REST playground can run the same mock as a small server on your machine.
Questions
Which playground should I use?
Use the REST API Playground to experiment with request headers, error responses, timeouts and retry policies. GraphQL and webhook playgrounds are coming next.
Do these playgrounds call a real server?
By default no. Requests go to a mock server that runs inside your browser tab. You can also switch to a real address, in which case your browser sends the request directly to it.
Can I receive real webhooks here?
No. A page running in your browser has no public address, so other services cannot call it. The webhook playground will simulate both the sender and the receiver inside your browser instead.
Can my own app call the mock API?
Not the one inside the page. Run npx tinypdf-mock and the same mock, with the same faults and your own routes, listens on your machine at http://localhost:4747. The playground page then shows each request it receives. The package is free and open source: read the code on GitHub.
Do I need an account?
No. Open a playground and send your first request.
