Is it possible to start a WireMockServer with http and https without specifying a port?
This only starts 1 the HTTPS url:
var server1 = WireMockServer.Start(port: null, ssl: true);
And this requires me to specify ports:
var server2 = WireMockServer.Start(new WireMockServerSettings
{
Urls = new[] { "http://localhost:9091", "https://localhost:9443" }
});
so something like this?
var server2 = WireMockServer.Start(new WireMockServerSettings
{
Urls = new[] { "http://localhost:null", "https://localhost:null" }
});
@zidad This is not yet possible, I'll look into this.
Much appreciated!
@zidad
You can try preview version 1.5.6-ci-16455 (https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions)
And use it like:
var httpAndHttpsFree = WireMockServer.Start(new WireMockServerSettings
{
HostingProtocol = HostingProtocol.HttpAndHttps,
});
@zidad, did you have time to test this?
Hi @StefH, testing it as you typed this comment :)... just a sec
@StefH it works for me, many thanks!
Thanks for testing.
I'll merge this PR.
Note that in the final version, the enum will be named HostingScheme/
https://github.com/WireMock-Net/WireMock.Net/pull/818