cjstehno / ersatz

🤖 A simulated HTTP server for testing client code with configurable responses.
https://cjstehno.github.io/ersatz
Apache License 2.0
47 stars 5 forks source link

Add helper for http/https path #177

Closed cjstehno closed 1 year ago

cjstehno commented 1 year ago

Currently, there are two methods for retrieving the server URL, one for http and one for https. Make a unified one that takes a boolean, e.g.

server.getUrl(true); // https url
server.getUrl(false); // http url

This will help with test cases where you use a boolean to test both http and https versions as it aligns with the secure(boolean) and https(boolean) configuration methods.