question

cwhitty avatar image
cwhitty asked cwhitty edited

Passing JSON as a quick call argument

When passing a JSON document like {"name":"helloTarget","value":"world"} into a quick call during an interactive session, remember that the iTest interpreter applies special meaning to the { and } characters. So, if the variable is being substituted once in the procedure, escape those characters with \\. If it's being substituted twice in the procedure, escape it twice. For example, if your REST POST action includes $parametersList in its body, then your JSON input string is being substituted twice, once on its way into the procedure, and a second time as it's being used by the POST method. So, the input argument needed is

\\\{"name":"helloTarget","value":"universe"\\\}

jsonargument
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.