Updated Proxying (markdown)

Stef Heyenrath
2019-11-05 07:59:35 +01:00
parent 8d227e9ea4
commit 2e533d4721

@@ -3,7 +3,7 @@ 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://<host>:<port>/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. The following code will proxy all GET requests made to http://<host>:<port>/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.
```csharp ``` c#
server server
.Given( .Given(
Request.Create() Request.Create()
@@ -16,7 +16,7 @@ server
``` ```
The JSON equivalent would be: The JSON equivalent would be:
```js ``` js
{ {
"Request": { "Request": {
"Path": { "Path": {
@@ -42,7 +42,7 @@ The JSON equivalent would be:
The proxy/intercept pattern described above is achieved by adding a low priority proxy mapping with a broad URL match and any number of higher priority stub mappings e.g. The proxy/intercept pattern described above is achieved by adding a low priority proxy mapping with a broad URL match and any number of higher priority stub mappings e.g.
```csharp ``` c#
// Low priority catch-all proxies to otherhost.com by default // Low priority catch-all proxies to otherhost.com by default
server server
.Given( .Given(