mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-07-02 02:51:50 +02:00
Revert changes that were made by mistake in prior PR (#35)
This commit is contained in:
committed by
Stef Heyenrath
parent
49ce2f0dfb
commit
65ac8c6462
@@ -10,12 +10,12 @@ namespace WireMock.Net.Console.Record.NETCoreApp
|
|||||||
{
|
{
|
||||||
var server = FluentMockServer.Start(new FluentMockServerSettings
|
var server = FluentMockServer.Start(new FluentMockServerSettings
|
||||||
{
|
{
|
||||||
Urls = new[] { "http://localhost:9090/", "https://localhost:9096/" },
|
Urls = new[] { "http://localhost:9095/", "https://localhost:9096/" },
|
||||||
StartAdminInterface = true,
|
StartAdminInterface = true,
|
||||||
ProxyAndRecordSettings = new ProxyAndRecordSettings
|
ProxyAndRecordSettings = new ProxyAndRecordSettings
|
||||||
{
|
{
|
||||||
Url = "https://www.msn.com",
|
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
|
SaveMapping = true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -95,24 +95,18 @@ namespace WireMock.Net.ConsoleApplication
|
|||||||
.Given(Request.Create().WithPath("/partial").UsingPost().WithBody(new SimMetricsMatcher(new[] { "cat", "dog" })))
|
.Given(Request.Create().WithPath("/partial").UsingPost().WithBody(new SimMetricsMatcher(new[] { "cat", "dog" })))
|
||||||
.RespondWith(Response.Create().WithStatusCode(200).WithBody("partial = 200"));
|
.RespondWith(Response.Create().WithStatusCode(200).WithBody("partial = 200"));
|
||||||
|
|
||||||
// http://localhost:8080/any/any?start=1000&stop=1&stop=2
|
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))
|
|
||||||
// );
|
|
||||||
server
|
server
|
||||||
.Given(Request.Create().WithPath("/*").UsingGet())
|
.Given(Request.Create().WithPath("/*").UsingGet())
|
||||||
.WithGuid("90356dba-b36c-469a-a17e-669cd84f1f05")
|
.WithGuid("90356dba-b36c-469a-a17e-669cd84f1f05")
|
||||||
|
.AtPriority(server.Mappings.Count() + 1)
|
||||||
.RespondWith(Response.Create()
|
.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");
|
System.Console.WriteLine("Press any key to stop the server");
|
||||||
|
|||||||
Reference in New Issue
Block a user