How to pass integer value to a json request body using HTTP Request parameter property?

I tried the HTTP Request parameter property with arguments for POST call but the argument type is not editable and sticks to String. What if I want to pass integer / double value instead of string? Please help. The screen snap is shown below.

Alternatively, I tried to pass the whole json body in assign operator (with and without parameters). In both the cases, the values are not taken but the post call runs successfully and a id is getting created for the run.

The assigned values are shown below -
Ex 1: “{‘firstName’: ‘Frank’,‘lastName’: ‘Marshall’,‘fideRating’: 2710}”
Ex 2: “{”“firstName”“: “”'”+fname+“'”“,”“lastName”“: “”'”+lname+“'”“,”“fideRating”“: “”'”+rating.ToString+“'”“}”
Ex 3: “{”“firstName”“: “”+fname+”“,”“lastName”“: “”+lname+”“,”“fideRating”“: “”+rating.ToString+”“}”
In all of the above examples, the POST call runs successfully with appending the Id tag in the response but the input tags (firstname, lastName and fideRating) are not taken. Please help !!

Hi @appan12345,
Parameters are mostly included at the end of end point address with “?” before the whole string. So instead of adding arguments as parameters you can defined variables and use them in end point string.

1 Like

@Pablito, I know how to pass query parameters. But using the parameters section not only we pass query parameters but also we can pass JSON objects as well into the JSON request body. But I wanted to pass integer values as json objects but later I realised that’s not possible as parameters are designed for string only. So, I passed the JSON objects as request body through assign property and now it’s working fine :slight_smile:

1 Like

Thank you for the update :slight_smile:
I’m glad that you solved the issue. Let me mark your post as a solution so other users could use it :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.