This message was deleted.
# general
s
This message was deleted.
a
Like a request query parameter or request body value?
s
Its based on the request body value
a
Yep! So you can take the values from the request body and use that to determine what your response body or bodyFile is
One sec, I’ll get an example
So, the following mapping:
Copy code
{
  "request": {
    "url": "/test"
  },
  "response": {
    "status": 200,
    "bodyFileName": "{{ jsonPath request.body '$.filename'}}.json"
  }
}
Will return the value of the
filename
key in the request body. So, a request with a body like
{ filename: "test" }
, would resolve to
test.json
, and serve up the file at
__files/test.json
.