Parameterize WebService Body

I am trying to parameterize the body of a post request but am not quite sure what I am doing wrong - I got the call working initially without parameterizing any fields but when I subbed out the variables everything went awry. Call returns a 200 (good) but I’m not getting the request body I expect. I assume something isn’t quite right with the post body…

Post Body contains the following which is probably around the area I’m messing up…

{
"BannerSlotIds":["$(bannerSlotIds)"],
"ProductFilters":[["storeId:$(storeId)"]],
}

I expect bannerSlotIds to be: [“Medium_Rectangle_300x250”, “Filmstrip_300x600”]
and the second row needs to be: “ProductFilters”:[[“storeId:1075”]]

On the Variables tab, I have storeId = 1075 and bannerSlotIds as “Medium_Rectangle_300x250”, “Filmstrip_300x600”.

Can anyone point out what I’m doing wrong? I’ve mucked around with the quotes a bit but nothing is helping.

Thanks!
Morgan

${bannerSlotIds}  // BRACES
1 Like

Gosh darn it… I knew it was something stupid… I’ll try it again. Thanks!

1 Like

@Morgan ${something} activate some magic not only in groovy gstrings.
some may found similar approach in simple bash scripts, provided are used inside double quoted strings and not single quoted.
one day you may find this usefull, young padawan.
e.g $(something here) in bash is actualy a command to be executed. in groovy has no meaning, therefore resolved as a plain string

do not confuse them.one day you will play with jenkins and such mistakes can unleash hell.