mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-15 14:53:37 +01:00
20 lines
567 B
Plaintext
20 lines
567 B
Plaintext
var server = WireMockServer.Start();
|
|
server
|
|
.Given(Request.Create()
|
|
.UsingMethod("GET")
|
|
.WithPath("test_path")
|
|
.WithParam("q", "42")
|
|
.WithClientIP("112.123.100.99")
|
|
.WithHeader("h-key", "h-value", true)
|
|
.WithCookie("c-key", "c-value", true)
|
|
.WithBody("b")
|
|
)
|
|
.WithGuid("8e7b9ab7-e18e-4502-8bc9-11e6679811cc")
|
|
.WithProbability(0.3)
|
|
.RespondWith(Response.Create()
|
|
.WithHeader("Keep-Alive", "test")
|
|
.WithBody("bbb")
|
|
.WithDelay(12345)
|
|
.WithTransformer()
|
|
);
|