Proxy request to different path?

92 views
Skip to first unread message

dka...@gmail.com

unread,
Jun 12, 2018, 10:52:05 AM6/12/18
to wiremock-user
Is it possible to proxy a request to a different path/host?

eg

response with: http://subdomain.mocklab.io/some/slightly/different/me/path    *note the position of 'me' *

This does seem a bit odd, but I'm trying to solve a cross-team approach to sharing a set of JSON responses.   Say we have 5000 responses all different by a single code, number, literal, whatever.  One team on another platfmor uses a slightly different path then another team on a different platform.  I want to drop the mock responses in ONE place and just setup a single mapping file to them.    Something like the below is what I am attempting.  But proxyBaseUrl is literally that, its just the base, the path is copied and appended, whereas I want to modify the path.  Possible somehow?  


{
"priority": 1,
"request":
{
"urlPattern": "/my-api/v1/code/us/en/cardetails\\?carcode=ATLPW",
"method": "GET"
},
"response":
{
"transformers": ["response-template"]
}
}
Reply all
Reply to author
Forward
0 new messages