Slackbot
11/07/2023, 4:37 PMDmitriy Advolodkin
11/07/2023, 4:37 PMDmitriy Advolodkin
11/07/2023, 4:38 PMLee Turner
11/07/2023, 6:14 PMq
parameter is valid json. You could parse the q
parameter value and reference the g
and s
values directly so it won’t matter what order they are in.Lee Turner
11/07/2023, 6:15 PM{
"name": "query-parameter-parsing",
"priority": 1,
"request": {
"urlPattern": "/apq/getStoreItem/storeExecutionItemInfoV3\\?q=(.*)",
"method": "GET"
},
"response": {
"status": 200,
"bodyFileName": "query-parameter-parsing.json",
"headers": {
"Content-Type": "application/json"
},
"transformers": [
"response-template"
]
}
}
Lee Turner
11/07/2023, 6:15 PM{{#parseJson 'parsedObj'}} {{request.query.q}} {{/parseJson}}
{
"g": "{{parsedObj.[0].g}}"
"s": "{{parsedObj.[0].s}}"
}
Lee Turner
11/07/2023, 6:16 PM<http://localhost:8080/apq/getStoreItem/storeExecutionItemInfoV3?q=[{>"c":"US","g":"806594766724","t":"GTIN14","s":"2473"}]
Lee Turner
11/07/2023, 6:16 PM{
"g": "806594766724"
"s": "2473"
}