79363066

Date: 2025-01-16 21:13:29
Score: 1.5
Natty:
Report link

This can be done using the proxyUrlPrefixToRemove. Adapted from https://wiremock.org/docs/proxying/#remove-path-prefix

{
    "request": {
        "method": "GET",
        "urlPattern": "/foo/.*"
    },
    "response": {
        "proxyBaseUrl": "http://backend.com/bar"
        "proxyUrlPrefixToRemove": "/foo"
    }
}

Requests to mock.com/foo?paramA=valueA&paramB=valueB would be forwarded to http://backend.com/bar?paramA=valueA&paramB=valueB

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: neighbors