mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-20 16:01:39 +02:00
This commit is contained in:
@@ -53,7 +53,7 @@ namespace WireMock.Net.ConsoleApplication
|
|||||||
.WithPath("/proxy-execute-keep-alive")
|
.WithPath("/proxy-execute-keep-alive")
|
||||||
)
|
)
|
||||||
.RespondWith(Response.Create()
|
.RespondWith(Response.Create()
|
||||||
.WithProxy(new ProxyAndRecordSettings { Url = "http://localhost:9999", BlackListedHeaders = new [] { "Keep-Alive" } })
|
.WithProxy(new ProxyAndRecordSettings { Url = "http://localhost:9999", BlackListedHeaders = new[] { "Keep-Alive" } })
|
||||||
.WithHeader("Keep-Alive-Test", "stef")
|
.WithHeader("Keep-Alive-Test", "stef")
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -142,11 +142,13 @@ namespace WireMock.Net.ConsoleApplication
|
|||||||
.WithBodyFromFile(@"c:\temp\x.json")
|
.WithBodyFromFile(@"c:\temp\x.json")
|
||||||
);
|
);
|
||||||
|
|
||||||
//server
|
server
|
||||||
// .Given(Request.Create().WithPath("/file_rel").UsingGet())
|
.Given(Request.Create().WithPath("/file_rel").UsingGet())
|
||||||
// .RespondWith(Response.Create()
|
.WithGuid("0000aaaa-fcf4-4256-a0d3-1c76e4862947")
|
||||||
// .WithBodyFromFile("Program.cs", false)
|
.RespondWith(Response.Create()
|
||||||
// );
|
.WithHeader("Content-Type", "application/xml")
|
||||||
|
.WithBodyFromFile("WireMock.Net.xml", false)
|
||||||
|
);
|
||||||
|
|
||||||
server
|
server
|
||||||
.Given(Request.Create().WithHeader("ProxyThis", "true")
|
.Given(Request.Create().WithHeader("ProxyThis", "true")
|
||||||
@@ -284,7 +286,7 @@ namespace WireMock.Net.ConsoleApplication
|
|||||||
.Given(Request.Create().WithPath("/jsonpathtestTokenJson").UsingPost())
|
.Given(Request.Create().WithPath("/jsonpathtestTokenJson").UsingPost())
|
||||||
.RespondWith(Response.Create()
|
.RespondWith(Response.Create()
|
||||||
.WithHeader("Content-Type", "application/json")
|
.WithHeader("Content-Type", "application/json")
|
||||||
.WithBodyAsJson(new { status = "OK", url = "{{request.url}}", transformed = "{{JsonPath.SelectToken request.body \"$.Manufacturers[?(@.Name == 'Acme Co')]\"}}" } )
|
.WithBodyAsJson(new { status = "OK", url = "{{request.url}}", transformed = "{{JsonPath.SelectToken request.body \"$.Manufacturers[?(@.Name == 'Acme Co')]\"}}" })
|
||||||
.WithTransformer()
|
.WithTransformer()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user