-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change response json after proxy #291
Comments
Why do you need to change the response value? |
We need to mock a state. |
@fabsimilian Do you want to change "foo" with fixed value? |
There is no current solution, but I'm trying to figure out a possible solution. For example, configuration like the following: {
"request": {
"uri": "/foo/bar"
},
"response": {
"proxy": {
"url": {
"template": "http://another.site/${req.uri}"
},
"modifier": {
"key" : {
"jsonPath": "$.data.foo"
},
"value": "fixed"
}
}
}
} |
Currently I'm using moco with json.
Is there a way to change a json property of a proxy response?
What I'm trying to achieve: Send a request to a different site, get the json response from that site and change a json property.
Example:
http://another.site/${req.uri} will return me a json like:
And I want to change property foo to another value.
The text was updated successfully, but these errors were encountered: