Files
WireMock.Net/examples/WireMock.Net.Console.Record.NETCoreApp/Program.cs
phillee007 49ce2f0dfb [Feature] Add support for client certificate password and test with real services that require client certificate auth (#32)
* Add support for client certificate password and test with some real services that require client certificates. Also update so when proxying, the path and query will be passed to the proxied api.

* Add correct param

* Update to read certificate from store instead of file

* Add support for client certificate password and test with some real services that require client certificates. Also update so when proxying, the path and query will be passed to the proxied api.

* Add correct param

* Fixup PR issues

* Add support for client certificate password and test with some real services that require client certificates. Also update so when proxying, the path and query will be passed to the proxied api.

* Add correct param

* Fixup PR issues
2017-06-16 11:36:10 +02:00

35 lines
1.2 KiB
C#

using Newtonsoft.Json;
using WireMock.Server;
using WireMock.Settings;
namespace WireMock.Net.Console.Record.NETCoreApp
{
static class Program
{
static void Main(params string[] args)
{
var server = FluentMockServer.Start(new FluentMockServerSettings
{
Urls = new[] { "http://localhost:9090/", "https://localhost:9096/" },
StartAdminInterface = true,
ProxyAndRecordSettings = new ProxyAndRecordSettings
{
Url = "https://www.msn.com",
X509Certificate2ThumbprintOrSubjectName = "x3bwbapi-dev.nzlb.service.dev",
SaveMapping = true
}
});
System.Console.WriteLine("Press any key to stop the server");
System.Console.ReadKey();
server.Stop();
System.Console.WriteLine("Displaying all requests");
var allRequests = server.LogEntries;
System.Console.WriteLine(JsonConvert.SerializeObject(allRequests, Formatting.Indented));
System.Console.WriteLine("Press any key to quit");
System.Console.ReadKey();
}
}
}