mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-14 22:33:35 +01:00
* 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
35 lines
1.2 KiB
C#
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();
|
|
}
|
|
}
|
|
} |