Skip to main content
Start the proxy:
Simile prints three addresses:
Set your application’s provider base URL to the printed API base. Your application still uses its real provider credentials. Simile forwards them to the provider. When learning is enabled, Simile redacts recognized credentials before it writes evidence to disk.

Follow one request

For example, your application calls:
Simile forwards the call to:
Simile forwards the method, path, query, headers, and body. It returns the provider’s status, headers, and body to your application. If the provider returns a redirect, Simile returns that redirect to your application. In most integrations, the base URL is the only setting you need to change:
becomes:
Restart your application if it reads this setting only at startup. Simile logs the method, path, status, request and response sizes, and elapsed time for each exchange.

Exercise useful cases

Call the operations your application actually depends on. Include:
  • successful requests;
  • invalid input and other public errors;
  • operations with more than one successful status;
  • optional inputs that change the response; and
  • repeated values such as IDs, references, amounts, and page numbers.
Repeated calls help Simile distinguish a stable request-to-response relationship from a value that matched only by chance.

Local proxy endpoints

The proxy reserves these paths: The /.simile/ prefix is reserved for Simile. Provider paths under that prefix cannot be proxied.

Stop the session

Keep the proxy running while you test your integration. Press Ctrl-C when you finish. If you used --learn, Simile finalizes the report, writes the draft service files, and checks that the draft compiles. Next, review the learned output.