Running Hoverfly as a webserverΒΆ

See also

Please carefully read through Hoverfly as a webserver alongside this tutorial to gain a high-level understanding of what we are about to cover.

Below you’ll find a complete example how to capture data with Hoverfly running as a proxy, and how to save it in a simulation file.

hoverctl start
hoverctl mode capture
curl --proxy http://localhost:8500 http://echo.jsontest.com/a/b
hoverctl export simulation.json
hoverctl stop

Now let’s start Hoverfly as a webserver in Simulate mode.

hoverctl start webserver
hoverctl import simulation.json
curl http://localhost:8500/a/b
hoverctl stop

Hoverfly simulated our request successfully, but it did so as a webserver, not as a proxy.

Note

Hoverfly starts in Simulate mode by default.