I am trying to create a Mock API server using Postman. My request will have a query parameter key
. I want to use the value passed to the key
query parameter in the mock response.
Request: {{url}}/foo?key=3
Response:
{
"3": {
...
}
}
I tried {{url}}/foo?key={{key}}
{
"{{key}}": {
...
}
}
but that's just returning the {{key}}
text as it is without any replacements. Is there any way I can use the query parameter values in the mock response?