API Simulator 0.4.0 Release

December 31, 2016


API Simulator v0.4.0 Release Changes

  • Support for JavaScript as scripting language is now built-in. Support for Groovy is out-of-the-box, too, and the Groovy JARs are still part of the distro.
  • Added the ability to forward unmatched requests to their actual destination and pass the actual responses back to the calling client instead of returning a default simulated output. That includes handling HTTPS tunneling (HTTP CONNECT).
  • Added in API Recorder detection and avoidance of infinite loop in the special case when the proxied destination address is one API Recorder is listening on.
  • Made the jump and upgraded Netty to v4.1.6.
  • Various bug fixes and improvements.

Here are a few details about the changes in this release.

API Simulator can be called directly (pointing to API Simulator’s endpoint) or as an HTTP/S proxy (by configuring the HTTP client to use it as a proxy). Even when called as an HTTP/S proxy, API Simulator will try to match the input request and return simulated response for the matched request. That includes simulating calls with the HTTP CONNECT method as part of HTTP tunneling. Returning response for a default simlet for unmatched input request, like one that returns HTTP “408 Not Found”, was the default and only behavior.

Now it is possible to configure API Simulator to forward the unmatched request to the actual endpoint. To enable request forwarding, pass in “-Dapisimulator.simlet.default=” argument at startup time or set “simlet.default=” in a sim.properties file in simulation’s “simlets” folder, and configure the HTTP client of the calling application/service to use API Simulator as HTTP/S proxy.

Upgrading Netty to v4.1.6 required resolving few issues caused by changes in Netty and fixes in places that used now-deprecated Netty classes. The major reason to upgrade at this time was issue #5104 in Netty we came across while implementing the request forwarding feature (see above).

We invite you to learn more about API Simulator, download and install it, and run the examples. Why not even create API simulations to help your own testing and development?

Let us know what you think at [feedback at APISimulator.com]. Many thanks for your interest and support!


Happy Simulations,
The API Simulator Team