diff --git a/Proxying.md b/Proxying.md index 8f6091c..1c244fd 100644 --- a/Proxying.md +++ b/Proxying.md @@ -8,8 +8,16 @@ Proxy responses are defined in exactly the same manner as stubs, meaning that th The following code will proxy all GET requests made to http://:/other/service/.* to http://otherservice.com/approot, e.g. when running WireMock.NET locally a request to http://localhost:9000/other/service/doc/123 would be forwarded to http://otherservice.com/approot/other/service/doc/123. -stubFor(get(urlMatching("/other/service/.*")) - .willReturn(aResponse().proxiedFrom("http://otherhost.com/approot"))); +```csharp +server + .Given( + Request.Create().WithPath("/other/service") + ) + .RespondWith( + Response.Create() + .ProxyFrom("http://otherhost.com/approot") + ); +``` The JSON equivalent would be: