From 65ac8c646237173849269c33f41cfeef7852aeb3 Mon Sep 17 00:00:00 2001 From: phillee007 Date: Sat, 17 Jun 2017 10:03:07 +1200 Subject: [PATCH] Revert changes that were made by mistake in prior PR (#35) --- .../Program.cs | 4 ++-- .../MainApp.cs | 22 +++++++------------ 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/examples/WireMock.Net.Console.Record.NETCoreApp/Program.cs b/examples/WireMock.Net.Console.Record.NETCoreApp/Program.cs index 55dc79bf..5d20a66f 100644 --- a/examples/WireMock.Net.Console.Record.NETCoreApp/Program.cs +++ b/examples/WireMock.Net.Console.Record.NETCoreApp/Program.cs @@ -10,12 +10,12 @@ namespace WireMock.Net.Console.Record.NETCoreApp { var server = FluentMockServer.Start(new FluentMockServerSettings { - Urls = new[] { "http://localhost:9090/", "https://localhost:9096/" }, + Urls = new[] { "http://localhost:9095/", "https://localhost:9096/" }, StartAdminInterface = true, ProxyAndRecordSettings = new ProxyAndRecordSettings { Url = "https://www.msn.com", - X509Certificate2ThumbprintOrSubjectName = "x3bwbapi-dev.nzlb.service.dev", + //X509Certificate2ThumbprintOrSubjectName = "www.yourclientcertname.com OR yourcertificatethumbprint (only if the service you're proxying to requires it)", SaveMapping = true } }); diff --git a/examples/WireMock.Net.ConsoleApplication/MainApp.cs b/examples/WireMock.Net.ConsoleApplication/MainApp.cs index 07f2c27b..4001ae4a 100644 --- a/examples/WireMock.Net.ConsoleApplication/MainApp.cs +++ b/examples/WireMock.Net.ConsoleApplication/MainApp.cs @@ -95,24 +95,18 @@ namespace WireMock.Net.ConsoleApplication .Given(Request.Create().WithPath("/partial").UsingPost().WithBody(new SimMetricsMatcher(new[] { "cat", "dog" }))) .RespondWith(Response.Create().WithStatusCode(200).WithBody("partial = 200")); - // http://localhost:8080/any/any?start=1000&stop=1&stop=2 - //server - // .Given(Request.Create().WithPath("/*").UsingGet()) - // .WithGuid("90356dba-b36c-469a-a17e-669cd84f1f05") - // .AtPriority(server.Mappings.Count() + 1) - // .RespondWith(Response.Create() - // .WithStatusCode(200) - // .WithHeader("Content-Type", "application/json") - // .WithHeader("Transformed-Postman-Token", "token is {{request.headers.Postman-Token}}") - // .WithBody(@"{""msg"": ""Hello world CATCH-ALL on /*, {{request.path}}, bykey={{request.query.start}}, bykey={{request.query.stop}}, byidx0={{request.query.stop.[0]}}, byidx1={{request.query.stop.[1]}}"" }") - // .WithTransformer() - // .WithDelay(TimeSpan.FromMilliseconds(100)) - // ); + http://localhost:8080/any/any?start=1000&stop=1&stop=2 server .Given(Request.Create().WithPath("/*").UsingGet()) .WithGuid("90356dba-b36c-469a-a17e-669cd84f1f05") + .AtPriority(server.Mappings.Count() + 1) .RespondWith(Response.Create() - .WithProxy("https://semhub-test.lbtest.anznb.co.nz:5200", "D2DBF134A8D06ACCD0E1FAD9B8B28678DF7A9816") + .WithStatusCode(200) + .WithHeader("Content-Type", "application/json") + .WithHeader("Transformed-Postman-Token", "token is {{request.headers.Postman-Token}}") + .WithBody(@"{""msg"": ""Hello world CATCH-ALL on /*, {{request.path}}, bykey={{request.query.start}}, bykey={{request.query.stop}}, byidx0={{request.query.stop.[0]}}, byidx1={{request.query.stop.[1]}}"" }") + .WithTransformer() + .WithDelay(TimeSpan.FromMilliseconds(100)) ); System.Console.WriteLine("Press any key to stop the server");