Use Variable in Body of HTTP-Request

134 views
Skip to first unread message

Jan Kohlmeyer

unread,
Jul 15, 2021, 4:41:35 AM7/15/21
to Automate
Hi,

i've a http-request with a json-type Request content body. 
This works fine: 
{"test" as Boolean : 1}

Now i want to change the 1 with a Variable.
I can save this, but ist dosen't work:
{"test" as Boolean : MyVar}

This is not allowed to save:
{"test" as Boolean : {MyVar}}

is there an option to see the request, that is realy send to the server. perhaps in the log?

regards, Jan

Zach Young

unread,
Jul 15, 2021, 8:13:31 PM7/15/21
to Automate
I've had success with sending variables in the request body using a dictionary. I set the keys and values in the dictionary and then just send the dictionary in the request.
I would also be interested in a way to see what the actual request was though.Screenshot_20210715-180930_Automate.jpg

Jan Kohlmeyer

unread,
Jul 16, 2021, 4:18:25 PM7/16/21
to Automate
Thank you. That works.

Henrik "The Developer" Lindqvist

unread,
Jul 23, 2021, 7:00:09 AM7/23/21
to Automate
{"test" as Boolean: MyVar} should work, if there's a MyVar variable declared.

Matale Sumana Thero

unread,
Jan 31, 2022, 7:47:45 AM1/31/22
to Automate
can you send screenshots of setting pages for both  dictionary and HTTP request... pleeease 🙇... im stuck.. 
Reply all
Reply to author
Forward
0 new messages