Debashish Jagadeba (deb)
01/10/2025, 4:46 AM"offset": {{request.query.offset}},
Lee Turner
01/10/2025, 10:03 AM{
"query": {
"offset": 1
}
}
Lee Turner
01/10/2025, 10:35 AMjsonPath
helper to pull the value out of the request. The nice thing is that the jsonPath
helper allows you to specify a default. So, create your response along the lines of:
{
"myOffset": {{jsonPath request.body '$.query.offset' default='0'}}
}
If you then send a request like this:
{
"query": {
"offset": 4
}
}
You will get a response like this:
{
"myOffset": 4
}
If you send a request like this:
{
"query": {
"foo": "bar"
}
}
You will get a response like this:
{
"myOffset": 0
}
Debashish Jagadeba (deb)
01/12/2025, 10:20 PM