Simulating HTTPS APIs¶
To capture HTTPS traffic, you need to use Hoverfly’s SSL certificate.
First, download the certificate:
We can now run Hoverfly with the standard
hoverctl start hoverctl mode capture curl --proxy https://localhost:8500 https://example.com --cacert cert.pem hoverctl mode simulate curl --proxy https://localhost:8500 https://example.com --cacert cert.pem hoverctl stop
Curl was able to make the HTTPS request using an HTTPS proxy because we provided it with Hoverfly’s SSL certificate.
This example uses Curl. If you are using Hoverfly in another environment, you will need to add the certificate to your trust store. This is done automatically by the Hoverfly Java library (see Hoverfly Java).