Remote mocks
A remote mock gives your team an HTTP endpoint before the real dependency is ready. Use it for a frontend in progress, a shared demo or deliberate error and delay scenarios. Echo can run a mock locally on the desktop or publish it to the hosted service at mock.gapfy.io. A hosted mock keeps answering without your desktop running.
Local desktop mocks intercept requests sent by Echo itself; they do not open an HTTP listener for another application.
Choose where the mock runs
- Local desktop: keep requests on your machine while authoring and experimenting.
- Hosted mock: give another machine a URL it can call directly.
- Inside your .NET application: use Mock.Client or Mock.Server with rules fetched through an application key. This is separate from the public hosted URL.
Publish your first mock
- Open Mocks in Maestro and select the workspace that owns the mock.
- Create a server and add a route with an HTTP method, path pattern, status and response. Choose a static response or a contract. You can also start from a mock saved and synced by the desktop.
- Open the server's hosting panel and enable public hosting. Changing hosting requires the workspace administrator permissions accepted by that panel.
- Copy the exact base URL shown by the panel and append your route path. The host name alone is not a mock endpoint.
- Call the route from the consuming application and check the response, including
X-Echo-Mock.
Contracts let you generate structured responses and keep versions. Static responses are useful when you need an exact body.
Share deliberately
Anyone who knows the public URL can call its routes. It is not protected by an eck_ application key. Use invented data, keep credentials out of bodies and headers, and share the URL only with its intended audience.
The hosting panel can disable hosting or rotate the public identifier and issue a new URL. Rotation means updating callers. Platform operators can suspend hosting or apply a kill switch; a suspended mock cannot be enabled by its owner until that suspension is lifted. Refresh the panel to inspect its current state.
Bring the rules into your application
Applications and keys explains the separate ServeMocks permission used by the .NET rule feed. Choose this path when your own application should serve or intercept requests using Echo rules, rather than calling the hosted URL.