Forum Discussion

jzyling's avatar
jzyling
Occasional Contributor
13 years ago

Using parameters in JSON Body in REST HTTP POST method

Hi,

I am trying to create a REST HTTP Request for a POST Method, using JSON data in the body. I am trying to use parameters instead of values in the body. For example:

POST Body:
{
"accountId":${accountID},
"userId":${userID}
}

I named a parameter as accountID with a long-type value like 1380000 of PLAIN style. I also named a parameter as userID with a long-type value like 250000000 of PLAIN style.

But after I submitted the POST request, the data in Raw became
{
"accountId":,
"userId":
}

I am wondering why those values were not taken? How to make it JSON style instead of PLAIN style?

Thanks a lot in advance!